Local, Test, UAT, PreProd, Prod. And maybe many more. You need different environments during the development lifecycyle.

  • Local environment: For the POCs and local development. You can use your local machine or company server.
  • Test environment: When you develop some modules, you can deploy your code to test environment for others to test it. Environment will be open to many users.
  • PreProd: This environment is as same as your prod environment but physically completely different. Final test cases will be run on this environment and will be deployed Prod environment.
  • Prod: Final environment of your app.

When I was working at Milsoft we were using local, test, PreProd and Prod environments. But at T2 we didn't use any PreProd environment. Working environment strategy depends on your testing capabilities. Milsoft is a CMMI 5 company and has very strict testing processes but T2 doesn't. Anyways.

If you have more than one environment and your deployment frequency is high, it takes a lot of time to setup and maintain the environment. At this point, AWS has a magical service named CloudFormation. You write your environment as json and it builds the environment in minutes and you start to use the environment in seconds. You can use all AWS services with CloudFormation easily and one amazing thing, CloudFormation has a design tool where you can easily create your environment. Here you can find many examples and templates.

After using CloudFormation I have never thought about VPC. But it is super important. Or high availability. I always thoguht scalability is enough for a robust system but high availabilty is totally different concept. Before CloudFormation my routine for each cloud environment was:

  • Create RDS, set security groups
  • Create mongodb instance from AMI, set security groups
  • Create Elastic Beanstalk environment and application, configure autoscale and SSL if requrired
  • Create Route 53 and forward ELB to DNS

Note that, I didn't mention about anything about high availability and VPC. It takes almost 4 - 5 hours each time to setup everything correct. Since it's hard to repeat every step, I don't want to remove the environment and set it up again.

What I can do with CloudFormation is amazing!

  • Create your environment once
  • Create stack from template upon each request

See! After creating your environment template, it's super easy to create environment from scratch! When you need a new environment, simply press create button :)

And the best part of the CloudFormation is you can see your environment! This is awesome because, you don't need to draw design diagram nor review all the services under different webpages. So when you see the design high available, scalable VPC with Multi AZ RDS and DynamoDB environment with monitoring and NAT health check role. Environment also sends automatic notification via SNS when scale up/down!

CloudFormation Design Tool

By using the design of the environment, you can check easily the security groups, private subnets' configuration and decide which AZ for auto scaling! This improves the way of designing the environment, your network knowledge and increase your software architecture skills.

It would be great if CloudFormation support versioning. You better keep template files under your source control, so all team member can review the design and prevent potential template file lost.

Here is an introduction for CloudFormation, great point of start discovering:

And in addition I strongly recommend you to take free qwiklabs trainings which makes it very easy for you to try AWS services in seconds.

TAGGED IN work, aws, cloud computing