Skip to content

Commit 576503e

Browse files
committed
lookup ami id with ssm via cdk
1 parent e322f31 commit 576503e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cdk_app/hyp3_stack.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import aws_cdk as cdk
44
from aws_cdk import cloudformation_include as cfn_inc
5+
from aws_cdk import aws_ssm as ssm
56
from constructs import Construct
67

78

@@ -23,7 +24,7 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None:
2324
'ExpandedMaxvCpus': os.environ['EXPANDED_MAX_VCPUS'],
2425
'MonthlyBudget': os.environ['MONTHLY_BUDGET'],
2526
'RequiredSurplus': os.environ['REQUIRED_SURPLUS'],
26-
'AmiId': os.environ['AMI_ID'],
27+
'AmiId': ssm.StringParameter.from_string_parameter_name(self, 'AmiId', os.environ['AMI_ID']),
2728
'InstanceTypes': os.environ['INSTANCE_TYPES'].split(','),
2829
}
2930
if os.environ['SECURITY_ENVIRONMENT'] != 'EDC':

0 commit comments

Comments
 (0)