Skip to content

Commit

Permalink
hard-code AmiId to work around ssm lookup bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jtherrmann committed Nov 1, 2024
1 parent 6516991 commit 57fe48b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions apps/main-cf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ Parameters:
- true

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

DefaultMaxvCpus:
Expand Down
7 changes: 5 additions & 2 deletions cdk_app/hyp3_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import aws_cdk as cdk
from aws_cdk import cloudformation_include as cfn_inc
from aws_cdk import aws_ssm as ssm
from constructs import Construct


Expand All @@ -24,7 +23,11 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None:
'ExpandedMaxvCpus': os.environ['EXPANDED_MAX_VCPUS'],
'MonthlyBudget': os.environ['MONTHLY_BUDGET'],
'RequiredSurplus': os.environ['REQUIRED_SURPLUS'],
'AmiId': ssm.StringParameter.from_string_parameter_name(self, 'AmiId', os.environ['AMI_ID']),

# FIXME: retrieve AmiId from ssm parameter store
#'AmiId': os.environ['AMI_ID'],
'AmiId': 'ami-02a9aa9c17c6204ae',

'InstanceTypes': os.environ['INSTANCE_TYPES'].split(','),
}
if os.environ['SECURITY_ENVIRONMENT'] != 'EDC':
Expand Down

0 comments on commit 57fe48b

Please sign in to comment.