Skip to content

Commit df04507

Browse files
authored
fix: use Amazon Linux 2023 (ECS Optimized) AMI (#320)
1 parent 95f172b commit df04507

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stack/stack.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,12 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None:
128128

129129
vpcid = os.environ["HLS_GCC_VPCID"]
130130
boundary_arn = os.environ["HLS_GCC_BOUNDARY_ARN"]
131+
# NOTE: This environment variable should usually look like `resolve:ssm:/mcp/amis/aml2023-ecs`
132+
# so we can lookup the latest AMI each time we launch an Ec2 instance.
133+
# We require the `resolve:ssm` in the variable so that we can also override the AMI ID
134+
# manually (e.g., if the SSM parameter wasn't updated).
131135
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id
132-
image_id = "resolve:ssm:/mcp/amis/aml2-ecs"
136+
image_id = os.environ["HLS_MCP_AMI_ID"]
133137
Aspects.of(self).add(PermissionBoundaryAspect(boundary_arn))
134138
else:
135139
vpcid = None

0 commit comments

Comments
 (0)