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

aws-ec2: Support Amazon Linux 2023 #24873

Closed
2 tasks
sharp-pixel opened this issue Mar 30, 2023 · 7 comments · Fixed by #25083
Closed
2 tasks

aws-ec2: Support Amazon Linux 2023 #24873

sharp-pixel opened this issue Mar 30, 2023 · 7 comments · Fixed by #25083
Assignees
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@sharp-pixel
Copy link

Describe the feature

Amazon Linux 2023 has been released on March 15, 2023: https://aws.amazon.com/about-aws/whats-new/2023/03/amazon-linux-2023/
Currently, CDK supports Amazon Linux 2022 which was in preview and not a thing anymore.
We should support Amazon Linux 2023 as both latest Amazon Linux version and specifically.

Use Case

Create an EC2 instance with AL2023

Proposed Solution

Add AL2023 to the enumeration of supported Amazon Linux versions.
Use the corresponding AMIs to provision the EC2 instance.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.72.0

Environment details (OS name and version, etc.)

macOS 13.3

@sharp-pixel sharp-pixel added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 30, 2023
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Mar 30, 2023
@khushail
Copy link
Contributor

khushail commented Mar 30, 2023

@sharp-pixel , Thanks for reaching out with this feature request. I am marking this as P2 which means our team won't be able to work on it immediately. However if you would like to contribute to making this change, here is contributing guide to get started.

We use +1s to help prioritize our work, and would be happy to re-evaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for re-prioritization.

@khushail khushail added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Mar 30, 2023
@sktan
Copy link
Contributor

sktan commented Mar 31, 2023

I have attempted to make this PR in the past. It seems like the CDK team is unwilling to implement Amazon Linux 2023 via the current enums and classes as it incompatible with the previous way linux 2022 was built. A whole new set of enums and classes will likely have to be built.

#21011 (comment)
#24690

When you run the integration tests without adding items to the Kernel enum, you will find that Amazon Linux 2023 can't be resolved through SSM as it is using a different kernel version 6.1 and newer images also seem to ship with a kernel-default parameter incase of kernel version bumps.

To make things even more interesting with the current implementation, Amazon Linux 2022 instances will actually fail to deploy. During the transition between preview -> general availability, the kernel version was bumped from 5.10 to 5.15 (so the SSM param for 5.10 that is currently being referenced does not exist anymore either).

lpizzinidev added a commit to lpizzinidev/aws-cdk that referenced this issue Mar 31, 2023
@sharp-pixel
Copy link
Author

Thanks for your input @sktan. I don't see the problem is adding an entry in the Kernel enum though.
I have an implementation that passes all tests locally. I will do more tests before the PR but the changes are simple so far. Maybe I am missing something.

@sharp-pixel
Copy link
Author

I simply followed https://docs.aws.amazon.com/linux/al2023/ug/get-started.html to get the correct names.

lpizzinidev added a commit to lpizzinidev/aws-cdk that referenced this issue Apr 5, 2023
@corymhall corymhall self-assigned this Apr 12, 2023
@mergify mergify bot closed this as completed in #25083 Apr 13, 2023
mergify bot pushed a commit that referenced this issue Apr 13, 2023
This PR introduces 3 new methods on `MachineImage` corresponding to the
3 available generations of amazon linux. We will be deprecating the
`latestAmazonLinux` method in favor of these separate methods per
generation. Each generation is a slightly different format, and having
them separate is more clear to the user what `latest` means.

closes #21011, closes #24873, closes #23523

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

otaviomacedo pushed a commit that referenced this issue Apr 13, 2023
This PR introduces 3 new methods on `MachineImage` corresponding to the
3 available generations of amazon linux. We will be deprecating the
`latestAmazonLinux` method in favor of these separate methods per
generation. Each generation is a slightly different format, and having
them separate is more clear to the user what `latest` means.

closes #21011, closes #24873, closes #23523

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
IntegralD-503 added a commit to IntegralD-503/ChatServerInfra that referenced this issue May 12, 2023
…comment was wrong, 2023 ami not implemented in cdk yet :(
@FabrizioCafolla
Copy link

Is there any news?

@jkuek
Copy link

jkuek commented Jun 29, 2023

Is there any news?

Look at the example shown on https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.AmazonLinux2023Kernel.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
6 participants