PDF-book Version 1.3, 2020-02-03: error when setting up nested Staging stack
erovira opened this issue · 1 comments
Hey @dvassallo , fist of all thank you for such an awesome book. I feel like it's a great way to get my feet wet on infrastructure-as-code on AWS
I had an issue when setting up the nested Staging stack. By following the book's instructions in the section Creating a nested stack for staging
I got the following error when attempting to deploy the infra:
Unable to fetch parameters ami-XXXXXX from parameter store for this account cloudformation
under the logical id Staging
.
I came here to compare my code and found the issue: When the book says to create stage.yml
as a copy of main.yml
, after following the steps, we end up with the following EC2AMI
in stage.yml
:
EC2AMI:
Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>'
Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2'
which causes the error. By changing it to a Type: String
like here 629ab65#diff-66ce0f88586a9e9a7f4f95e1483718f6R7 it got sorted out.
I searched in the book (V1.3) and didn't find any mention of this. Apologies in case I missed it!
Thanks.
I had the same issue and required the same fix.