WindowsImage

class aws_cdk.aws_ec2.WindowsImage(version, *, user_data=None)

Bases: object

Select the latest version of the indicated Windows version.

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.

https://aws.amazon.com/blogs/mt/query-for-the-latest-windows-ami-using-systems-manager-parameter-store/

__init__(version, *, user_data=None)
Parameters
  • version (WindowsVersion) –

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

Return type

None

Methods

get_image(scope)

Return the image to use in the given context.

Parameters

scope (Construct) –

Return type

MachineImageConfig