Skip to content

ec2: Upgrade NatInstanceProvider #28907

@tmokmss

Description

@tmokmss

Describe the feature

The current NatInstanceProvider uses the AWS official NAT instance AMI, which has already reached EOL on Dec 31 2023.

NAT AMI is built on the last version of the Amazon Linux AMI, 2018.03, which reached the end of standard support on December 31, 2020 and end of maintenance support on December 31, 2023. For more information, see the following blog post: Amazon Linux AMI end of life.

If NAT instances are a better match for your use case than NAT gateways, you can create your own NAT AMI from a current version of Amazon Linux as described in Create a NAT AMI.

https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html

It'd be great if CDK provides an easy way to configure a modern NAT instance.

Use Case

NAT Instances are still popular since they can be much cheaper than NAT Gateways.

Proposed Solution

We can create a NAT instance from AL2023 AMI by using these commands in this doc.

I think CDK can internally use ec2 userdata to configure them and abstract all the complexities away from users.

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.124.0

Environment details (OS name and version, etc.)

macOS

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudbugThis issue is a bug.effort/mediumMedium work item – several days of effortp1

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions