Replies: 1 comment 1 reply
-
Parameters in CloudFormation are believed to be used during CloudFormation deployment. In the code, it seems that parameters of CloudFormation are not being referenced. Please refer to the following manual for guidance. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can anyone point me in the right direction here.
I would like to be able to run up an ec2 instance with differing user_commands (additional software installed) based on different files fed as parameters.
For instance, at the path
'/Users/xxx/dev/gitlab/infrastructure/aws/cdk/cdk-ec2-parameterized/cdk_ec2/user_data/user_data_hello_world.sh'
I have one such file. I am runningcdk synth
from ``'/Users/xxx/dev/gitlab/infrastructure/aws/cdk/cdk-ec2-parameterized/`.From
cdk_ec2_stack.py
:Running the following is failing.
FileNotFoundError: [Errno 2] No such file or directory: '/Users/xxx/dev/gitlab/infrastructure/aws/cdk/cdk-ec2-parameterized/cdk_ec2/user_data/${Token[TOKEN.19]}'
However, if I explicitly use
with open(os.path.join(current_dir, "user_data", "user_data_hello_world.sh")) as f
rather thanwith open(os.path.join(current_dir, "user_data", file_name_param)) as f
, then it works.What am I missing?
Beta Was this translation helpful? Give feedback.
All reactions