GenericLinuxImage

class aws_cdk.aws_ec2.GenericLinuxImage(ami_map, *, user_data=None)

Bases: object

Construct a Linux machine image from an AMI map.

Linux images IDs are not published to SSM parameter store yet, so you’ll have to manually specify an AMI map.

ExampleMetadata

infused

Example:

ec2.NatProvider.instance(
    instance_type=ec2.InstanceType("t3.micro"),
    machine_image=ec2.GenericLinuxImage({
        "us-east-2": "ami-0f9c61b5a562a16af"
    })
)
Parameters
  • ami_map (Mapping[str, str]) –

  • user_data (Optional[UserData]) – Initial user data. Default: - Empty UserData for Linux machines

Methods

get_image(scope)

Return the image to use in the given context.

Parameters

scope (Construct) –

Return type

MachineImageConfig