-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Step Functions - States.StringToJson
error when used in ResultSelector
for S3 getObject
action
#10787
Comments
Welcome to LocalStack! Thanks for reporting your first issue and our team will be working towards fixing the issue for you or reach out for more background information. We recommend joining our Slack Community for real-time help and drop a message to LocalStack Pro Support if you are a Pro user! If you are willing to contribute towards fixing this issue, please have a look at our contributing guidelines and our contributing guide. |
@bilki Thank you for taking the time to compile this report. We recently merged some changes that aim to address this issue. I would be grateful if you could test the new build at your earliest convenience and provide feedback on whether it resolves the problem you encountered. Thank you once again for bringing this issue forward! |
Hi @MEPalma, Here's the step I'm trying to execute: {
"StartAt": "Write manifest file",
"States": {
"Write manifest file": {
"Type": "Task",
"OutputPath": null,
"ResultPath": null,
"Resource": "arn:aws:states:::aws-sdk:s3:putObject",
"Parameters": {
"Bucket": "bucket",
"Key.$": "States.Format('backfills/v1/{}/manifest.json', $.backfill.id)",
"ContentType": "application/json",
"Body": {
"backupDateTime.$": "$.backfill.backupDateTime"
}
}
}
}
} And the error I'm getting is:
I'm using AWS CDK with TypeScript. Interestingly, if I build the Body with the following code: Thanks for your help! |
Hi @gerson24 Thank you for providing the bug report! I was able to reproduce the behaviour and have recently merged some changes which should address this issue. I would be very grateful if you could test the new build at your earliest convenience. Thanks! |
Is there an existing issue for this?
Current Behavior
Whenever I use the
StringToJson
intrinsic function (https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-intrinsic-functions.html#asl-intrsc-func-json-manipulate) in theResultSelector
of a task calling the S3getObject
action (see steps to reproduce for the definition), the step function fails to execute that function with the messages:Expected Behavior
This task step should return the
getObject
action responseBody
field string value converted into a JSON in the step resultlatest
field.How are you starting LocalStack?
Custom (please describe below)
Steps To Reproduce
How are you starting localstack (e.g.,
bin/localstack
command, arguments, ordocker-compose.yml
)Testcontainers (https://github.com/testcontainers/testcontainers-scala) with
3.4.0
imageClient commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
Simply create a step function with the following definition, upload a file
latest.json
to an S3 bucket (change bucket and file key accordingly), then execute it.Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: