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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠