Integrating Python and AWS Part 2

This was a presentation I gave at IndyPy in March 2019. Integrating Python with AWS part 2, I used these AWS services: - IAM - S3 - EC2 - DynamoDB

Other Services, etc.: - Boto3 - Reddit - Twitter

Integrating Python with AWS Part 2

more ...

Integrating Python and AWS Part 1

This was a presentation I gave at IndyPy in March 2019. Integrating Python with AWS, I used these AWS services: - IAM - S3 - EC2 - DynamoDB

Other Services, etc.: - Boto3 - Reddit - Twitter

Integrating Python with AWS Part 1

more ...

AWS Auto Scaling Groups Part 2

Auto Scaling Deployment Basics

Auto Scaling groups can be created in many ways:
  • SDKs
  • AWS console
  • AWS CLI
  • AWS APIs
Life Cycle Hooks

Auto Scaling Life Cycle Hooks allow you to control the timing of launch and termination of your auto scaling instances.

Launch Configurations

Launch Configurations allow us to set details regarding the creation of your AutoScaling instances.

Let's create a Launch Configuration in the console:

First, navigate to EC2 inside the AWS console. In the left side bar scroll down to the Auto Scaling section. There you will find Launch Configuration.

alt text

Next we will click the 'Create launch configuration' button:

alt text

We will then then to select the AWS AMI that we want to use for our Launch Configuration:

alt text

You will then need to select the size of instance you want, then your Configuration Details:

alt text

Lets look carefully at this page: - Name: This is your one shoot to name your Launch Configuration, you can't change it latter! I have found this out the hard way! :( - IAM role: This is useful if you want to assign a role to the EC2 instances in the group, for example you may want the instances to have access to S3 storage, or you may need an application on the instances to have the ability to access SQS to create messages. - Monitoring: If you want AWS CloudWatch enabled on the machines make sure to check this box.

  • Advanced Details: There are two options I want to point out in here.
    • User Data: This is where you would put any bash scripting that you want you machines to run on start up. I don't know why AWS calls it this. They could have called it any number of things: Start up script, Start up commands...but they didn't. User Data it is.
    • IP Address Type …
more ...

AWS Auto Scaling Groups Part 1

alt text

AWS Auto Scaling provides a great solution for High Availability for your services and applications.

Benefits:

  • Fault Tolerance
  • Better Availability
  • Better Cost Management

Let's look at each of these benefits a little closer:

Fault Tolerance:

AWS Auto Scaling provides fault tolerance by allow you to create policies to scale-in and scale-out your machines. If an instance becomes unhealthy it can be replaced automatically. Machines can be balanced across availability zones (AZs). This provides outage protection in the event that an AZ goes down.

Better Availability:

With Auto Scaling you don't have to guess at the amount of capacity you need. Set your policies based on any number of metrics, and allow the policies to automatically scale the group out or back in. If the load becomes too great, machines can be added. If the load on the group reduces, machines can be removed.

Better Cost Management:

All of this creates cost savings because a correctly configured auto scaling group will only use the resources it needs for the current load. If you are actively in the development process auto scaling give you the flexibility to choose the best testing/deployment method for your use case, without the cost of a dedicated development environment.

In Part 2 we will continue to look at Auto Scaling Concepts.

more ...