Skip to content

Commit 57fe48b

Browse files
committed
hard-code AmiId to work around ssm lookup bug
1 parent 6516991 commit 57fe48b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

apps/main-cf.yml.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ Parameters:
5252
- true
5353

5454
AmiId:
55+
# FIXME: retrieve AmiId from ssm parameter store
56+
#Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
57+
#Default: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
5558
Type: AWS::EC2::Image::Id
5659

5760
DefaultMaxvCpus:

cdk_app/hyp3_stack.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
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
65
from constructs import Construct
76

87

@@ -24,7 +23,11 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None:
2423
'ExpandedMaxvCpus': os.environ['EXPANDED_MAX_VCPUS'],
2524
'MonthlyBudget': os.environ['MONTHLY_BUDGET'],
2625
'RequiredSurplus': os.environ['REQUIRED_SURPLUS'],
27-
'AmiId': ssm.StringParameter.from_string_parameter_name(self, 'AmiId', os.environ['AMI_ID']),
26+
27+
# FIXME: retrieve AmiId from ssm parameter store
28+
#'AmiId': os.environ['AMI_ID'],
29+
'AmiId': 'ami-02a9aa9c17c6204ae',
30+
2831
'InstanceTypes': os.environ['INSTANCE_TYPES'].split(','),
2932
}
3033
if os.environ['SECURITY_ENVIRONMENT'] != 'EDC':

0 commit comments

Comments
 (0)