Skip to content
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

Lambda: SnapStart Warning #32210

Open
jrobbins-LiveData opened this issue Nov 20, 2024 · 4 comments
Open

Lambda: SnapStart Warning #32210

jrobbins-LiveData opened this issue Nov 20, 2024 · 4 comments
Labels
@aws-cdk/aws-lambda Related to AWS Lambda documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p3

Comments

@jrobbins-LiveData
Copy link
Contributor

jrobbins-LiveData commented Nov 20, 2024

Describe the issue

In trying out the new Python SnapStart feature, I see this warning

[Warning at /LambdaFunction] SnapStart only support published Lambda versions. Ignore if function already have published versions [ack: @aws-cdk/aws-lambda:snapStartRequirePublish]

Since apparently the only way I can enable SnapStart is on the Function construct (and not on the VersionOptions construct), it seems that "doing it right" with CDK entails getting this spurious warning?

Also, the grammar of the warning seems a bit wrong: It would be better phrased as SnapStart only supports published Lambda versions. Ignore if function already has published versions.

Links

This isn't technically a documentation issue, but, rather, a CDK deploy-time output issue, but since there's a grammar component, I thought maybe it belonged here.

@jrobbins-LiveData jrobbins-LiveData added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Nov 20, 2024
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Nov 20, 2024
@pahud
Copy link
Contributor

pahud commented Nov 20, 2024

Yes we should fix the grammar error. We welcome the PRs.

To dismiss this warning, you can use cdk acknowledge for that.

@pahud pahud added effort/small Small work item – less than a day of effort p3 and removed needs-triage This issue or PR still needs to be triaged. labels Nov 20, 2024
@jrobbins-LiveData
Copy link
Contributor Author

Thanks @pahud. Is there a "HOWTO" doc I could read to learn how to create the PR?

@pahud
Copy link
Contributor

pahud commented Nov 22, 2024

@jrobbins-LiveData

We have an official contributing guide
https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md

And you might be interested to read this blog of sharing as well

Contributing to AWS CDK
https://community.aws/content/2jhmIXdVWZJy3uJnUfEzEmp652j/contributing-to-aws-cdk

@mpetito-envative
Copy link

To dismiss this warning, you can use cdk acknowledge for that.

I may be missing something but if I run npx cdk acknowledge @aws-cdk/aws-lambda:snapStartRequirePublish I end up with a null in the cdk.context.json acknowledged-issue-numbers property and the warning persists.

I instead had to add the following acknowledgement in my cdk code:

    cdk.Annotations.of(func).acknowledgeWarning(
      '@aws-cdk/aws-lambda:snapStartRequirePublish',
    );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p3
Projects
None yet
Development

No branches or pull requests

3 participants