aws / aws/aws-cdk

LambdaInvoke: Warn legacy state type will be deployed with payloadResponseOnly

Open
#28,950 3 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-lambda effort/small feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start at the LambdaInvoke entry point and trace how payloadResponseOnly affects the synthesized state type. Then inspect the synth and deploy warning paths to determine where the legacy-state warning belongs; done means users are clearly alerted whenever this option selects the legacy Lambda invoke state.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.