I need help to setup a test environment under Nginx that is able to target a specific EC2 instance. I am using Amazon's Elastic Load Balancer and auto scaling to manage my EC2 production instances.

What I need now is to be able to launch a new EC2 instance based on the production image/AMI and then test new software, configurations, etc. before upgrading the production servers. Ideally, I'd like to be able to go to test.mysite.com and access that specific new EC2 instance.

Does anyone have any suggestions on how to do that? Also, is it possible to only give my IP access to the test server?


Update: I'm also using Route 53 if that makes a difference


It's pretty straight-forward.

  1. Set up a test environment following the same procedure as you followed to set up your Production environment.
    • This includes creating a Scaling Group, ELB, and whatever else you already have.
    • Don't worry about code/AMI versions quite yet.
  2. Set up a Security Group for the EBS instance that allows your IP address in to talk to it.
  3. Configure the public IP of the ELB to be test.mysite

Setting it up that way should make testing changes a lot easier and will ease the implementation of new code/AMIs.

  • If I wanted to keep it really simple, can I do it without the scaling group and ELB? Just spin up an EC2 instance when needed to test and then shut it down when I'm finished? I wouldn't need to scale it. – Littlebob Sep 9 '14 at 19:11
  • @Littlebob You could totally do that. The scaling group is just to validate your code works in your production environment. – sysadmin1138 Sep 9 '14 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.