Closed ebrucucen closed 3 years ago
Assumption: Custom::FindAMI is some magic non-standard API call, I need to dig into this
Ubuntu16Ami:
Type: Custom::FindAMI
Properties:
ServiceToken: !Sub ${GetLatestAMI.Arn}
Owner: "099720109477"
Name: "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20190913"
Architecture: "x86_64
099720109477 is AWS id for Canonical. The image used is here: https://thecloudmarket.com/search?architecture=x86_64&order=created_at+desc&page=1&platform=ubuntu&search_term=ubuntu-xenial-16.04-amd64-server-20190913&tag=ubuntu&type=machine
The Cloud formation template yaml is copied from here: https://stackoverflow.com/questions/55479945/cloudformation-always-use-latest-ami. I expect there will be a better way of provisioning this.
So after reading AWS docs for 1/2 day , I opened the cloudfoundation editor imported the template yaml then made the lambda function a dependency of Ubuntu16Ami and the provisioning works.
http://ec2-18-196-88-236.eu-central-1.compute.amazonaws.com
We can close this.
awsdeploy.yml fails with an error "ami is not found"...