LambdaInvoke: Warn legacy state type will be deployed with payloadResponseOnly
Describe the feature
After lots of digging around I realized that under the hood when someone adds payloadResponseOnly: true to the LambdaInvoke class it will implement an older version of this state type.
I had no idea until months later I saw the type Task: lambda (legacy):invoke in the console.
Feature idea: It would be nice to have a warning in the IDE types or in the CLI console when doing a synth or deploy.
Use Case
The use case would be to pre-warn folks like myself who don't go into the AWS console too often that adding this property will result in the non-optimized lambda invoke state type in their state machine. They can then quickly decide if that's ok or not for them.
It can also save folks lots of time debugging to try to figure out why this is happening. Example: I'm an AWS Hero and it took me 2hrs to finally figure this out.
Proposed Solution
No response
Other Information
Thanks for reading and for the great work on this project. 🚀
Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
CDK version used
2.124.0
Environment details (OS name and version, etc.)
Mac OS Sonoma 14.2.1
Thank you. Are you interested to submit a PR for that?
Hey @pahud thanks for the reply.
At this time, I'm rather busy and don't have the time to contribute a PR for this. Feel free to assign this task to someone else.
I can keep an eye on this issue and if it's not resolved when I do have some more time, happy to take a look into a contribution. That will probably be about 2-3 months in the future though.
This also occurs when invoking a lambda in the asl of a step function while using the lambda ARN as the resource. Some sort of warning for this scenario could be helpful as well. My assumption is that under the covers this gets treated as payloadResponseOnly: true.
"Test State": {
"Type": "Task",
"Resource": "${ArnOfFunctionToInvoke}",
"Parameters": {
"id.$": "$.id"
},
"ResultPath": "$.response"
}