AndrewGuenther / fck-nat

Feasible cost konfigurable NAT: An AWS NAT Instance AMI
https://fck-nat.dev
MIT License
1.27k stars 50 forks source link

The provided CloudFormation template fails when you try to launch the ASG from a different region from the AMI location #29

Closed cr0fters closed 1 year ago

cr0fters commented 1 year ago

I get the following CloudFormation error when I've tried to launch from within the London region:

Resource handler returned message: "AMI ami-05b6d5a2e26f13c93 is invalid: The image id '[ami-05b6d5a2e26f13c93]' does not exist (Service: AutoScaling, Status Code: 400, Request ID: 3e011264-ee7c-4808-93b7-23155c08181f)" (RequestToken: 09753d0b-5eae-610d-efce-95f0802b9c17, HandlerErrorCode: InvalidRequest)

Could you possibly copy the AMI into a few different popular regions and add a CloudFormation mapping to point to the regional AMI? I've tried copying it but get the error Failed to copy ami-05b6d5a2e26f13c93 You do not have permission to access the storage of this ami

cr0fters commented 1 year ago

I've temporarily got around this by launching an instance from the AMI, creating an image from it, then copying the image into the London region and referencing that AMI ID.

AndrewGuenther commented 1 year ago

The fck-nat AMI is published to all non-opt-in regions. You can find your region's AMI ID with the following command:

aws ec2 describe-images --owners 568608671756 --filters 'Name=name,Values=fck-nat-amzn2-*'
cr0fters commented 1 year ago

Thanks, and apologies, I missed this in the docs :)