Cloudformation NATGateway association error


Nowadays I am working about CloudFormation in AWS, it’s a really time consumer IAC tool. Maybe the reason that I blame it like that is that I am newbie about AWS. But honestly I tried Terraform and I feel better while using it.

In this blog post, I’ll talk about how to create NATGateway by using CloudFormation. That example stole huge amount of my time. It’s true that first is always like that.

Requirements for creating NATGateway

  • Creating EIP
    • Associating it with NATGateway

Error:

Elastic IP address [XXX.XXX.XXX.XXX] could not be associated with this NAT gateway