aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

feat(lambda): add LATEST to ParamsAndSecretsVersions

Open okasyun opened this issue 7 months ago • 3 comments

Issue # (if applicable)

Closes #31772.

Reason for this change

calling

cdk.aws_lambda.ParamsAndSecretsLayerVersion.fromVersion(cdk.aws_lambda.ParamsAndSecretsVersions.V1_0_103)

will always return the lambda layer with a version of 4 for us-east-1. the CDK documentation states that this is the latest version, while the documentation in lambda shows that 16 is the latest in this region.

Not only us-east-1 but also other resions have the same problems.

Description of changes

add property latest to ParamsAndSecretsVersions.

Parameters and Secrets Lambda Extension ARN can be referenced by using this latest.

Description of how you validated changes

I created unit tests and integration tests. Both were successful.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

okasyun avatar May 06 '25 11:05 okasyun

@okasyun Could you please re-run your integ test?

@aws-cdk-testing/framework-integ: Snapshot Results: 
@aws-cdk-testing/framework-integ: Tests:    1 failed, 1186 total
@aws-cdk-testing/framework-integ: Failed: /codebuild/output/src1098740116/src/github.com/aws/aws-cdk/packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.params-and-secrets.js
@aws-cdk-testing/framework-integ: Error: Some tests failed!
@aws-cdk-testing/framework-integ: To re-run failed tests run: integ-runner --update-on-failed
@aws-cdk-testing/framework-integ:     at main (/codebuild/output/src1098740116/src/github.com/aws/aws-cdk/node_modules/@aws-cdk/integ-runner/lib/index.js:10279:13)
@aws-cdk-testing/framework-integ: Error: integ-runner exited with error code 1
@aws-cdk-testing/framework-integ: Tests failed. Total time (2m19.0s) | integ-runner (2m8.0s) | /codebuild/output/src1098740116/src/github.com/aws/aws-cdk/node_modules/jest/bin/jest.js (9.9s)
@aws-cdk-testing/framework-integ: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

badmintoncryer avatar May 08 '25 00:05 badmintoncryer

@okasyun Could you please follow below steps?

  • Merge the newest origin/main
  • Run yarn at the repository root
  • Run npx lerna run build --scope=@aws-cdk-testing/framework-integ --skip-nx-cache
  • Delete the existing snapshot folder
  • Run the integ test

badmintoncryer avatar May 08 '25 13:05 badmintoncryer

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 050292a6d7d3a4d3f13249f52a0d9998cc0c9448
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

aws-cdk-automation avatar May 11 '25 10:05 aws-cdk-automation

Hi okasyun, are you still working on this PR?

pahud avatar Aug 19 '25 14:08 pahud

This PR has been in the MERGE CONFLICTS state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing

To prevent automatic closure:

  • Resume work on the PR
  • OR request an exemption by adding a comment containing 'Exemption Request' with justification e.x "Exemption Request: "
  • OR request clarification by adding a comment containing 'Clarification Request' with a question e.x "Clarification Request: "

This PR will automatically close in 14 days if no action is taken.

aws-cdk-automation avatar Oct 26 '25 00:10 aws-cdk-automation

This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error.

aws-cdk-automation avatar Nov 09 '25 00:11 aws-cdk-automation

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[bot] avatar Nov 09 '25 00:11 github-actions[bot]