GenericSSMParameterImage

class aws_cdk.aws_ec2.GenericSSMParameterImage(parameter_name, os, user_data=None)

Bases: object

Select the image based on a given SSM parameter.

This Machine Image automatically updates to the latest version on every deployment. Be aware this will cause your instances to be replaced when a new version of the image becomes available. Do not store stateful information on the instance if you are using this image.

The AMI ID is selected using the values published to the SSM parameter store.

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_ec2 as ec2

# user_data: ec2.UserData

generic_sSMParameter_image = ec2.GenericSSMParameterImage("parameterName", ec2.OperatingSystemType.LINUX, user_data)
Parameters:

Methods

get_image(scope)

Return the image to use in the given context.

Parameters:

scope (Construct) –

Return type:

MachineImageConfig

Attributes

parameter_name

Name of the SSM parameter we’re looking up.