Lambda Function works but Step Function Fails

0

I am working with a Lambda Function that receives the below payload. I run this in test for my Lambda function and it runs successfully. When I run my Step Function it errors with the below error message. This is confusing me because I am expecting my testing in Lambda Function to work in Step Function as well.

What am I missing?

Error Message from Step Function: "errorMessage": "the JSON object must be str, bytes or bytearray, not list". Payload from Step Function Input "[{"AWSDT": "2024-03-06 04:00:00", "DATALOADCONFIGID": 1, "PROC": "info.usp_Load_F7", "TABLENAME": "Info.F7", "FILENAME": "F7_202403060400.csv"}]"

Test Payload: "[{"AWSDT": "2024-03-06 04:00:00", "DATALOADCONFIGID": 1, "PROC": "info.usp_Load_F7", "TABLENAME": "Info.F7", "FILENAME": "F7_202403060400.csv"}]"

Execution Results from Lambda Function: Test Event Name (unsaved) TestInt

Response null

Function Logs
[INFO]	2024-03-06T04:20:11.600Z		Found credentials in environment variables.
[INFO]	2024-03-06T04:20:11.768Z		SUCCESS: Connection to RDS for MySQL instance succeeded
START RequestId: aae1f5bf-2ba3-45c8-b972-e12f86176e86 Version: $LATEST
[INFO]	2024-03-06T04:20:11.771Z	aae1f5bf-2ba3-45c8-b972-e12f86176e86	loading event data
[{"AWSDT": "2024-03-06 04:00:00", "DATALOADCONFIGID": 1, "PROC": "info.usp_Load_F7", "TABLENAME": "Info.F7", "FILENAME": "F7_202403060400.csv"}]
[INFO]	2024-03-06T04:20:11.771Z	aae1f5bf-2ba3-45c8-b972-e12f86176e86	Length of dictionary = 163
[INFO]	2024-03-06T04:20:11.771Z	aae1f5bf-2ba3-45c8-b972-e12f86176e86	setting variables
[INFO]	2024-03-06T04:20:11.771Z	aae1f5bf-2ba3-45c8-b972-e12f86176e86	Variables loaded
[INFO]	2024-03-06T04:20:11.772Z	aae1f5bf-2ba3-45c8-b972-e12f86176e86	Values used ['info.usp_Load_F7'],[1],['Info.F7'],['F7_202403060400.csv'],['2024-03-06 04:00:00'],
END RequestId: aae1f5bf-2ba3-45c8-b972-e12f86176e86
REPORT RequestId: aae1f5bf-2ba3-45c8-b972-e12f86176e86	Duration: 14.08 ms	Billed Duration: 15 ms	Memory Size: 128 MB	Max Memory Used: 89 MB	Init Duration: 660.16 ms
Monty
質問済み 2ヶ月前291ビュー
1回答
1
承認された回答

If you are using python for your lambda, this could be coming from using json.loads to parse the input, if that is the case try switching that out for json.dumps and it may solve your issue.

AWS
Gillian
回答済み 2ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ