@@ -139,6 +139,7 @@ export class EcsOptimizedAmi implements ec2.IMachineImage {
139
139
+ ( this . windowsVersion ? 'ami-windows-latest/' : 'ecs/optimized-ami/' )
140
140
+ ( this . generation === ec2 . AmazonLinuxGeneration . AMAZON_LINUX ? 'amazon-linux/' : '' )
141
141
+ ( this . generation === ec2 . AmazonLinuxGeneration . AMAZON_LINUX_2 ? 'amazon-linux-2/' : '' )
142
+ + ( this . generation === ec2 . AmazonLinuxGeneration . AMAZON_LINUX_2023 ? 'amazon-linux-2023/' : '' )
142
143
+ ( this . windowsVersion ? `Windows_Server-${ this . windowsVersion } -English-Full-ECS_Optimized/` : '' )
143
144
+ ( this . hwType === AmiHardwareType . GPU ? 'gpu/' : '' )
144
145
+ ( this . hwType === AmiHardwareType . ARM ? 'arm64/' : '' )
@@ -192,6 +193,19 @@ export interface EcsOptimizedImageOptions {
192
193
* Construct a Linux or Windows machine image from the latest ECS Optimized AMI published in SSM
193
194
*/
194
195
export class EcsOptimizedImage implements ec2 . IMachineImage {
196
+ /**
197
+ * Construct an Amazon Linux 2023 image from the latest ECS Optimized AMI published in SSM
198
+ *
199
+ * @param hardwareType ECS-optimized AMI variant to use
200
+ */
201
+ public static amazonLinux2023 ( hardwareType = AmiHardwareType . STANDARD , options : EcsOptimizedImageOptions = { } ) : EcsOptimizedImage {
202
+ return new EcsOptimizedImage ( {
203
+ generation : ec2 . AmazonLinuxGeneration . AMAZON_LINUX_2023 ,
204
+ hardwareType,
205
+ cachedInContext : options . cachedInContext ,
206
+ } ) ;
207
+ }
208
+
195
209
/**
196
210
* Construct an Amazon Linux 2 image from the latest ECS Optimized AMI published in SSM
197
211
*
@@ -253,6 +267,7 @@ export class EcsOptimizedImage implements ec2.IMachineImage {
253
267
+ ( this . windowsVersion ? 'ami-windows-latest/' : 'ecs/optimized-ami/' )
254
268
+ ( this . generation === ec2 . AmazonLinuxGeneration . AMAZON_LINUX ? 'amazon-linux/' : '' )
255
269
+ ( this . generation === ec2 . AmazonLinuxGeneration . AMAZON_LINUX_2 ? 'amazon-linux-2/' : '' )
270
+ + ( this . generation === ec2 . AmazonLinuxGeneration . AMAZON_LINUX_2023 ? 'amazon-linux-2023/' : '' )
256
271
+ ( this . windowsVersion ? `Windows_Server-${ this . windowsVersion } -English-Full-ECS_Optimized/` : '' )
257
272
+ ( this . hwType === AmiHardwareType . GPU ? 'gpu/' : '' )
258
273
+ ( this . hwType === AmiHardwareType . ARM ? 'arm64/' : '' )
0 commit comments