Skip to content
v2.274.0

MachineImageConfig Struct ​

Configuration for a machine image.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';

declare const userData: ec2.UserData;
const machineImageConfig: ec2.MachineImageConfig = {
  imageId: 'imageId',
  osType: ec2.OperatingSystemType.LINUX,
  userData: userData,
};

Properties ​

imageIdstringimage_idstrimageIdStringImageIdstringImageId*stringrequired#
The AMI ID of the image to use.
Operating system type for this image.
userDataUserDatauser_dataUserDatauserDataUserDataUserDataUserDataUserDataUserDatarequired#
Initial UserData for this image.