I am following this guide to send approval emails to myself: https://aws.amazon.com/blogs/aws/using-callback-urls-for-approval-emails-with-aws-step-functions/
The code in this guide is exactly the same as mine & I have given this input to the step function:
{
"name": "TestName"
}
Every time I try to run the step function, i get the following error: Error
KeyError Cause
{
"errorMessage": "'urls'",
"errorType": "KeyError",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 35, in lambda_handler\n urls = json.loads(response['Payload'].read())['urls']\n"
]
}
Its referring to this line: urls = json.loads(response['Payload'].read())['urls']
this line is part of the code that is in the AWS Lambda function.
What does this error mean, What can I do to fix this?
I have never tested that Lambda/Python end to end doc so i cannot tell if you it works. However, this one definitely works. It invokes multiple AWS Services via a Lambda function and does include sending email messages. It uses the Java V2 AWS SDK.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.