Skip to content

Commit

Permalink
fetch ami id from ssm via cdk, with .string_value fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jtherrmann committed Nov 1, 2024
1 parent 57fe48b commit 0bce0ca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cdk_app/hyp3_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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 @@ -23,11 +24,7 @@ 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'],

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

'AmiId': ssm.StringParameter.from_string_parameter_name(self, 'AmiId', os.environ['AMI_ID']).string_value,
'InstanceTypes': os.environ['INSTANCE_TYPES'].split(','),
}
if os.environ['SECURITY_ENVIRONMENT'] != 'EDC':
Expand Down

0 comments on commit 0bce0ca

Please sign in to comment.