Skip to content

Commit

Permalink
chore(lambda): fix snapstart warning grammar issue (#32829)
Browse files Browse the repository at this point in the history
### 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*
  • Loading branch information
iankhou authored Jan 10, 2025
1 parent 78fba23 commit c3ff821
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-lambda/lib/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,7 @@ Environment variables can be marked for removal when used in Lambda@Edge by sett
// so it can't be checked at function set up time
// SnapStart supports the Java 11 and Java 17 (java11 and java17) managed runtimes.
// See https://docs.aws.amazon.com/lambda/latest/dg/snapstart.html
Annotations.of(this).addWarningV2('@aws-cdk/aws-lambda:snapStartRequirePublish', 'SnapStart only support published Lambda versions. Ignore if function already have published versions');
Annotations.of(this).addWarningV2('@aws-cdk/aws-lambda:snapStartRequirePublish', 'SnapStart only supports published Lambda versions. Ignore if function already has published versions.');

if (!props.runtime.supportsSnapStart) {
throw new ValidationError(`SnapStart currently not supported by runtime ${props.runtime.name}`, this);
Expand Down

0 comments on commit c3ff821

Please sign in to comment.