AWS AutoScaling

Creating an environment manually

  1. SecurityGroup [SG] alb-sg

    • allow tcp/80 from 0.0.0.0/0

    • allow tcp/443 from 0.0.0.0/0

  2. SecurityGroup alb-2-app-sg

    • allow tcp/80 from self

    • allow tcp/443 from self

  3. TargetGroup [TG]

  4. LoadBalancer [LB] (pointing to TargetGroup)

  5. LaunchTemplate [LT]

  6. AutoScalingGroup [ASG]

    • add to sg alb-2-app-sg

    • register ASG with TG

    • use Default version from [LT]

Using a custom image

  1. create separate instance

  2. connect via SSH

  3. install the nginx web server

  4. in EC2 create image

  5. modify [LT] to use new image

  6. start instance refresh

Add a database

  1. SG app-2-db

  2. create instance

  3. copy connection information around