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

Closed
jrobbins-LiveData opened this issue Nov 20, 2024 · 6 comments · Fixed by #32829
Closed

Lambda: SnapStart Warning #32210

jrobbins-LiveData opened this issue Nov 20, 2024 · 6 comments · Fixed by #32829
Assignees
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 good first issue Related to contributions. See CONTRIBUTING.md 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',
    );

@kaizencc kaizencc added the good first issue Related to contributions. See CONTRIBUTING.md label Jan 9, 2025
@iankhou iankhou self-assigned this Jan 10, 2025
@mergify mergify bot closed this as completed in #32829 Jan 10, 2025
@mergify mergify bot closed this as completed in c3ff821 Jan 10, 2025
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

1 similar comment
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 10, 2025
iankhou added a commit that referenced this issue Jan 13, 2025
### Issue #32210 

Closes #32210 

### Reason for this change

Incorrect grammar in a SnapStart warning that appears during cdk deployment.

### Description of changes

Corrected the line:

`SnapStart only support published Lambda versions. Ignore if function already have published versions`

to:

`SnapStart only supports published Lambda versions. Ignore if function already has published versions.`

### Describe any new or updated permissions being added

No permissions changes.

### Description of how you validated changes

No testing needed, only changed text in a warning.

### Checklist
- [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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 good first issue Related to contributions. See CONTRIBUTING.md p3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants