-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws-ec2): Support Amazon Linux 2023 as a first-class option for BastionHostLinux #29493
Comments
I support that but changing the default image would cause breaking changes and the deployed bastion hosts would be replaced. I guess we probably need a feature flag in this case. Need input and ack from the maintainers. We welcome and appreciate PRs for this. Are you interested to submit a PR for it? |
It looks like it'd be as simple as just updating this line to use a different machine image: aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/bastion-host.ts Lines 183 to 185 in 1c82930
So it seems like people could just pass 2023 as their image:
So the real question is "can/should we feature flag this as a new default?". I understand that it'd be a breaking change, but that's kinda the point of feature flags. There's a pattern for this with other deprecations like this. Since AmazonLinux2 goes EOL in about 1 year, people are going to have to think about this anyway. If I can get validation that changing this default via a feature flag is acceptable, I could make the PR. |
…eature flag) (#31996) ### Issue #29493 Closes #29493 ### Reason for this change Right now, if a `machineImage` property isn't passed to `BastionHostLinux`, it defaults to an Amazon Linux 2 image. Since Amazon Linux 2 is hitting end-of-life in June 2025, it'd be better to default to Amazon Linux 2023. Since changing this default would be a breaking change, I placed it behind a feature flag, `@aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault`. ### Description of changes - Added the `@aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault` - When set, and a `machineImage` is not provided, we use the latest Amazon Linux 2023 image, instead of Amazon Linux 2. ### Description of how you validated changes - Unit Tests - Integration Test ### 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*
Comments on closed issues and PRs are hard for our team to see. |
Describe the feature
Today, the excellent
BastionHostLinux
construct defaults to an Amazon Linux 2 base image:aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/bastion-host.ts
Lines 63 to 69 in fac4a9c
However, Amazon Linux 2 will hit end of life in June 2025.
I see that I can pass my own
MachineImage
, but it'd be nice if there was a first-class flag to opt-in.Use Case
It'd be nice to still be able to use
BastionHostLinux
, but use the newer Amazon Linux so I don't have to worry about upgrading next year.Proposed Solution
It'd probably be a good idea to introduce a new feature flag and plan to automatically opt people into Amazon Linux 2023 on the next major version.
Other Information
No response
Acknowledgements
CDK version used
2.132.1
Environment details (OS name and version, etc.)
macOS sonoma
The text was updated successfully, but these errors were encountered: