Skip to content

feat(cloudfront): use JavaScript runtime 2.0 as the default for CloudFront Functions (under feature flag)#35941

Merged
mergify[bot] merged 37 commits intoaws:mainfrom
badmintoncryer:function_js2
Mar 25, 2026
Merged

feat(cloudfront): use JavaScript runtime 2.0 as the default for CloudFront Functions (under feature flag)#35941
mergify[bot] merged 37 commits intoaws:mainfrom
badmintoncryer:function_js2

Conversation

@badmintoncryer
Copy link
Copy Markdown
Contributor

Issue # (if applicable)

None

Reason for this change

Cloudfront function supports for 2 JavaScript runtimes(1.0 & 2.0). Runtime 2.0 is backward compatible with 1.0 and its use is generally recommended, but CDK uses 1.0 by default for backward compatibility reasons.

Description of changes

  • define @aws-cdk/aws-cloudfront:defaultFunctionRuntimeV2_0 feature flag
  • use 2.0 runtime by default when the feature flag is enabled

Describe any new or updated permissions being added

None

Description of how you validated changes

Add both unit and integ tests

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team November 4, 2025 14:13
@github-actions github-actions bot added p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Nov 4, 2025
@badmintoncryer badmintoncryer marked this pull request as ready for review November 4, 2025 14:14
@badmintoncryer badmintoncryer changed the title feat(cloudfront): use JavaScript runtime 2.0 by default for function feat(cloudfront): use JavaScript runtime 2.0 by default for function(under feature flag) Nov 4, 2025
@badmintoncryer badmintoncryer changed the title feat(cloudfront): use JavaScript runtime 2.0 by default for function(under feature flag) feat(cloudfront): Use JavaScript runtime 2.0 as the default for CloudFront Functions (under feature flag) Nov 11, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 11, 2025
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
mrgrain
mrgrain previously approved these changes Mar 24, 2026
Copy link
Copy Markdown
Contributor

@mrgrain mrgrain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@badmintoncryer Approved and ready to merge once conflicts are resolved.

# Conflicts:
#	packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md
#	packages/aws-cdk-lib/cx-api/lib/features.ts
#	packages/aws-cdk-lib/recommended-feature-flags.json
Include V2NEXT feature flags (cloudfront defaultFunctionRuntimeV2_0,
elb usePostQuantumTlsPolicy) in generated files.
@badmintoncryer
Copy link
Copy Markdown
Contributor Author

@mrgrain Thank you for your review!! I've resolved all conflicts.

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 25, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 25, 2026

Merge Queue Status

  • Entered queue2026-03-25 12:13 UTC · Rule: default-squash
  • Checks passed · in-place
  • Merged2026-03-25 12:45 UTC · at e69b2c7441c5963975d295b485ad3dbaadbb193a

This pull request spent 31 minutes 14 seconds in the queue, including 31 minutes running CI.

Required conditions to merge

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 25, 2026

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit cd0df14 into aws:main Mar 25, 2026
21 of 23 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

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 Mar 25, 2026
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 25, 2026
@badmintoncryer badmintoncryer deleted the function_js2 branch March 25, 2026 12:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants