Search code examples
amazon-web-servicesamazon-ec2amazon-rds

Moving EC2 to another AZ but can't enter the field value


I have an RDS running in Region/AZ us-east-1f and an EC2 (after a reset to generate a new private key) running in us-east-1a. The EC2 can't reach the RDS and I think its because they're in different AZ's now. So I read this http://aws.amazon.com/premiumsupport/knowledge-center/move-ec2-instance/ on how to move the EC2. But when I try and execute the automated script/page the region field will only accept us-east-1 and not the letter after the 1. How do I tell the script to put the EC2 in us-east-1f (so it will be able to reach the RDS)? Thank you. Update: I'm now focused on making sure both RDS and EC2 are in the same VPC. The RDS is in the rds-launch-wizard VPC, and the EC2 is in a VPC I created. In order to change the RDS VPC you need to create a new subnet but I get an error message in doing that saying I need to select multiple AZ. I do select multiple AZ but the error message persists with the same message. This is frustrating.


Solution

  • The answer to AZ/VPC/network changes in an EC2 is that you need to stop the EC2 instance, create a new image (AMI), and then launch that new AMI. In launching the new AMI you will have the opportunity to select the VPC/AZ/subnet/security group etc. In my case I had to set up a new set of inbound rules on the EC2 security group to allow SSH (port 22 only from my IP address) and HTTP (port 80) from all IPv4 addresses. And believe it or not, in the course of launching the new AMI an option appeared to "connect to an RDS" to which I agreed and my EC2 and RDS are now talking!