Showing posts with label aws. Show all posts
Showing posts with label aws. Show all posts

Thursday, April 7, 2016

How to manage traffic with Elastic Load Balancing

Distributes application traffic over multiple EC2 instances.
  1. Knowledge
    1. Load balancing is the process of ditributing a large amount of traffic to multiple servers.
    2. Without load balancing, certain application servers would fail, while others go under utilized.
  2. Strategy
    1. The first step is to define the load balancer within AWS.
    2. Next, assign security groups to the load balancer.
    3. Then. configure health checks for the EC2 instances.
    4. Finally, tag, verify and create your new load balancer.
  3. Execution

Wednesday, April 6, 2016

How to deploy applications with Elastic Beanstalk

Easy to begin, impossible to outgrow.
  1. Knowledge
    1. Elastic Beanstalk is a Amazon Web Service for deploying and hosting software applications.
    2. If this sounds like Heroku, your intuition is correct.
  2. Strategy
    1. Here's a tutorial specific for deploying a Django application.
    2. Setup a python environment with Django.
    3. Create a Django project.
    4. Configure the app for Elastic Beanstalk.
    5. Deploy with the EB CLI.
  3. Execution
    1. Common issues:
      1. Powershell ExecutionPolicy
      2. EB CLI Could not find any platforms
      3. Server 404 response after deploy

Wednesday, July 8, 2015

Deploying Custom Amazon Images with the AWS CLI on Demand

Hey All! Today I am going to go over how to make a gold image of an Amazon EC2 instance, then deploy copies of that instance on demand with a simple AWS CLI script! 

First of all, this tutorial assumes you have already installed the AWS CLI tools on your client architecture. You will also want to create a new IAM user such that you aren't using your root credentials to hit the AWS API, and make sure this new user has enough permissions to create new instances. Make sure to use that user's Access Key ID and Secret Access Key in your AWS CLI config. Finally, we will want to have launched default AMI, configured this system like we want every subsequent system (this includes setting up the AWS access keys, security group, and subnet) , and then turn this into a custom AMI using the Web Console:


Next, we are going to launch a copy of that instance using the following AWS command line script:

ec2-run-instances ami-xxxxxxxx -t t2.medium -k my-key-xxxxx -s subnet-xxxxxxxx -g sg-xxxxxxxx --associate-public-ip-address true

And boom! This will return all the details of the new instance it has just launched in the console, making it easy to script this simple command and parse the output to chain even more automated deployment (like then ssh-ing to the server and running some updated configuration scripts)!