From 1e0bbac865c81091d667aec687259e0d76ecb2c9 Mon Sep 17 00:00:00 2001 From: Joel Balcaen Date: Fri, 19 Apr 2024 20:52:06 -0300 Subject: [PATCH] update key --- state_machines/email_form_fill/state_machine.tf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/state_machines/email_form_fill/state_machine.tf b/state_machines/email_form_fill/state_machine.tf index 5eafe71..b391719 100644 --- a/state_machines/email_form_fill/state_machine.tf +++ b/state_machines/email_form_fill/state_machine.tf @@ -60,7 +60,7 @@ resource "aws_sfn_state_machine" "sfn_state_machine" { "Body" : { "sender_email.$" : "$.Records[0].ses.mail.source", "destination_email.$" : "$.Records[0].ses.mail.destination", - "email_id.$" : "$.Records[0].ses.mail.source", + "email_id.$" : "$.Records[0].ses.mail.messageId", "prompts" : [ { "key" : "A", @@ -70,8 +70,7 @@ resource "aws_sfn_state_machine" "sfn_state_machine" { ] }, "Bucket" : var.workspace_bucket_name, - "Key" : "MyData" - }, + "Key.$" : "States.Format('{}.email', $.Records[0].ses.mail.messageId)", }, "Resource" : "arn:aws:states:::aws-sdk:s3:putObject" }, "Lambda Invoke" : {