Setting up an SSH Key

alt text

SSH is an amazing protocol that allows us to authenticate, log into, and work on remote machines. But trying to remember all the passwords is kind of a pain!

Wouldn't it be great if a machine just trusted you? If you could just log in with no hassle?

Well, your dreams have come true! because with an SSH key you can do just that!

Set up an SSH key on your local machine

I am going to show you how to setup an ssh key on bash (Linux, and Mac)

  1. First from a bash terminal enter this command: ssh-keygen
  2. For your first key just accept the default location.
  3. Next use the ssh-copy-id + the user and machine you are trying to log into for example: ssh-copy-id root@192.168.1.100
  4. You will be prompted to enter your password to the machine, but after that you will be able to log into the machine by simply typing: ssh root@192.168.1.100

And there you have it, not nearly as scary as it sounds to setup. Now I will say this is just the most basic use case. You can get much more detailed with encryption levels, turning off password authentication, etc. But this is enough to get you started!

more ...

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 ...

First Post

This is the first post of knox.technology!

print("Hello World!)

  • First Post
more ...