Introduction of containers services at Amazon AWS

Here are the following Services which is offered by AWS at present which will help you to onboarding Containers on AWS platforms.

Amazon Elasitc Container Services (ECS)

Amazon Elasitc Container Services (ECS) was introduced in 2014. Amazon EC2 Container Service (ECS) is a cloud computing service in Amazon Web Services (AWS) that manages containers. It enables developers to deploy and manage scalable applications that run on groups of servers called clusters through application programming interface (API) calls and task definitions.

Amazon ECS is a scalable service that is accessible through the AWS Management Console and software developer’s kits (SDKs). It is comparable to Kubernetes, Docker Swarm, and Azure Container Service.

ECS runs your containers on a cluster of Amazon EC2 (Elastic Compute Cloud) virtual machine instances pre-installed with Docker. It handles installing containers, scaling, monitoring, and managing these instances through both an API and the AWS Management Console.

EC2 Container Service includes two schedulers, which enable users to deploy containers based on computing needs or availability requirements. Amazon ECS runs containers on top of EC2 instances, which provides isolation to help businesses achieve compliance

Amazon ECS competes with Kubernetes, Google’s open source container orchestration system. While the container management tools and use cases differ, Kubernetes has the following features that ECS does not:

  • It is deployable to non-AWS clouds and on-premises resources;
  • It has storage options outside AWS; and
  • It receives contributions from the developer community, while not all ECS code is publicly available.

Amazon Elastic Container Repository (ECR)

Amazon Elastic Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. Amazon ECR is integrated with Amazon Elastic Container Service (ECS), simplifying your development to production workflow. Amazon ECR eliminates the need to operate your own container repositories or worry about scaling the underlying infrastructure.

Amazon Elastic Kubernetes Services (EKS)

Amazon Elastic Kubernetes Services (EKS) was introduced by AWS in November 2017 at its re:Invent conference. Amazon Elastic Container Service for Kubernetes (Amazon EKS) makes it easy to deploy, manage, and scale containerized applications using Kubernetes on AWS. Kubernetes control plane that is high availability, with three masters across three availability zones. This is something that used to be challenging to setup yourself. EKS is just running upstream Kubernetes so you can connect to it with kubectl just like a self managed Kubernetes.

Amazon Fargate

Amazon Fargate was introduced by AWS in November 2017 at its re:Invent conference.
AWS Fargate is a new service for running containers without needing to manage the underlying infrastructure.
AWS Fargate is a technology for Amazon ECS and EKS that allows you to run containers without having to manage servers or clusters. With AWS Fargate, you no longer have to provision, configure, and scale clusters of virtual machines to run containers.

Your control plane can just ask Fargate to run a container and Fargate takes care of all the details. Pricing is based on how much CPU and memory you reserve for the container to use, on a per second basis.

 

 

Tagged : / / / / / / / /

List of AWS regions and availability zones

List of  AWS Regions

This is complete list of  AWS regions available currently.

S.No Code Name
1 us-east-1 US East (N. Virginia)
2 us-west-2 US West (Oregon)
3 us-west-1 US West (N. California)
4 eu-west-1 EU (Ireland)
5 eu-central-1 EU (Frankfurt)
6 ap-southeast-1 Asia Pacific (Singapore)
7 ap-northeast-1 Asia Pacific (Tokyo)
8 ap-southeast-2 Asia Pacific (Sydney)
9 ap-northeast-2 Asia Pacific (Seoul)
10 sa-east-1 South America (São Paulo)
11 cn-north-1 China (Beijing)
12 ap-south-1 India (Mumbai)

AWS upcoming regions

 

S.No Code Name
1 N/A OHIO
2 N/A MONTREAL
3 N/A UK
4 N/A INDIA
5 N/A NINGXIA

List of  AWS regions and their availability zones

S.No AWS region code AWS region name Number Of Availability Zones Availability Zone Names
1 us-east-1 Virginia 4 us-east-1a
us-east-1b
us-east-1c
us-east-1e
2 us-west-2 Oregon 3 us-west-2a
us-west-2b
us-west-2c
3 us-west-1 N. California 3 us-west-1a
us-west-1b
4 eu-west-1 Ireland 3 eu-west-1a
eu-west-1b
eu-west-1c
5 eu-central-1 Frankfurt 2 eu-central-1a
eu-central-1b
6 ap-southeast-1 Singapore 2 ap-southeast-1a
ap-southeast-1b
7 ap-southeast-2 Sydney 3 ap-southeast-2a
ap-southeast-2b
ap-southeast-2c
8 ap-northeast-1 Tokyo 2 ap-northeast-1a
ap-northeast-1c
9 ap-northeast-2 Seoul N/A N/A
10 sa-east-1 Sao Paulo 3 sa-east-1a
sa-east-1b
sa-east-1c
11 cn-north-1 China (Beijing) N/A N/A
12 ap-south-1 India (Mumbai) 2 ap-south-1a
ap-south-1b

If you are familiar with AWS CLI you can always check regions and availability zones using following aws cli commands

Find regions using AWS CLI

Command:  aws ec2 describe-regions

Tagged : / /

Getting Started with Amazon Simple Queue Service (SQS)

amazon-simple-queue-service

We’ve put together a list of resources that we think will be useful to you, as you familiarize yourself with Amazon SQS and get started working with it.

Introductory Topics

What is Amazon SQS?
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/Welcome.html

Getting Started with Amazon SQS:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-getting-started.html

How Amazon SQS Queues Work:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-how-it-works.html

Best Practices for Amazon SQS:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-best-practices.html

Using Amazon SQS Dead Letter Queues:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html

Using JMS with Amazon SQS:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-java-message-service-jms-client.html

Limits in Amazon SQS:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-limits.html

Integration with Other AWS Services

Subscribing an Amazon SQS Queue to an Amazon SNS Topic:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-subscribe-queue-sns-topic.html

Monitoring Amazon SQS with CloudWatch:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/MonitorSQSwithCloudWatch.html

Managing Large Amazon SQS Messages (Up to 2 GB) Using Amazon S3:
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-s3-messages.html

Tagged : / / / / /

AWS Storage FAQ

What data is stored in ephemeral storage of an Amazon EC2 instance?

Anything that is not stored on an ebs volume that is mounted to the instance will be lost. For instance, if you mount your ebs volume at /mystuff, then anything not in /mystuff will be lost. If you don’t mount an ebs volume and save stuff on it, then I believe everything will be lost.

You can create an AMI from your current machine state, which will contain everything in your ephemeral storage. Then, when you launch a new instance based on that AMI it will contain everything as it is now.

Meaning of “Warning: Please note that any data on the ephemeral storage of your instance will be lost when it is stopped”

There is a difference between “stop” and “terminate”. If you “stop” an instance that is backed by EBS then the information on the root volume will still be in the same state when you “start” the machine again.

Basically, root volume (your entire virtual system disk) is ephemeral, but only if you choose to create AMI backed by Amazon EC2 instance store.

If you choose to create AMI backed by EBS then your root volume is backed by EBS and everything you have on your root volume will be saved between reboots.

If you are not sure what type of volume you have, look under EC2->Elastic Block Store->Volumes in your AWS console and if your AMI root volume is listed there then you are safe. Also, if you go to EC2->Instances and then look under column “Root Device” of your instance and if it says “ebs”, then you don’t have to worry about data on your root device.

Tagged : / / / /

What is the difference between terminating and stopping an EC2 instance?

terminating-and-stopping-an-ec2-instance

Answer

Terminate Instance

When you terminate an EC2 instance, the instance will be shutdown and the virtual machine that was provisioned for you will be permanently taken away and you will no longer be charged for instance usage. Any data that was stored locally on the instance will be lost. Any attached EBS volumes will be detached and deleted. However, if you attach an EBS Snapshot to an instance at boot time, the default option in the Dashboard is to delete the attached EBS volume upon termination.

Stop Instance

When you stop an EC2 instance, the instance will be shutdown and the virtual machine that was provisioned for you will be permanently taken away and you will no longer be charged for instance usage. The key difference between stopping and terminating an instance is that the attached bootable EBS volume will not be deleted. The data on your EBS volume will remain after stopping while all information on the local (ephemeral) hard drive will be lost as usual. The volume will continue to persist in its availability zone. Standard charges for EBS volumes will apply. Therefore, you should only stop an instance if you plan to start it again within a reasonable timeframe. Otherwise, you might want to terminate an instance instead of stopping it for cost saving purposes.

The ability to stop an instance is only supported on instances that were launched using an EBS-based AMI where the root device data is stored on an attached EBS volume as an EBS boot partition instead of being stored on the local instance itself. As a result, one of the key advantages of starting a stopped instance is that it should theoretically have a faster boot time. When you start a stopped instance the EBS volume is simply attached to the newly provisioned instance. Although, the AWS-id of the new virtual machine will be the same, it will have new IP Addresses, DNS Names, etc. You shouldn’t think of starting a stopped instance as simply restarting the same virtual machine that you just stopped as it will most likely be a completely different virtual machine that will be provisioned to you.

Tagged : / / / / / / /

What’s the difference between ephemeral and volume boot disks?

Different boot sources

There are several different kinds of sources to boot from in the DreamCompute dashboard, but they all need to create some sort of virtual disk for the virtual machine to boot. The virtual disk can use either ephemeral storage or volume block storage. When launching an instance, you have several Boot Source options:

  • Image: Launches an instance from the image you choose onto either an ephemeral disk or a new volume disk.
  • Instance Snapshot: Launches an instance from the instance snapshot you choose onto either an ephemeral disk or a new volume disk.
  • Volume: Launches an instance from an existing bootable volume.
  • Volume Snapshot: Creates a volume from the volume snapshot you choose and then launches an instance using that new bootable volume.

Ephemeral boot disks

Ephemeral disks are virtual disks that are created for the sole purpose of booting a virtual machine and should be thought of as temporary.

Ephemeral disks are useful if you aren’t worried about needing to duplicate an instance or destroy an instance and save the data. You can still mount a volume on an instance that is booted from an ephemeral disk and put any data that needs to be saved on it, instead of using the volume as the root of your OS.

  • Can be snapshotted: Useful for duplicating instances or having a copy of an instance at a certain point in time. Snapshots of ephemeral boot disks are stored as Images and count against DreamCompute’s Image quota.
  • Do not use up volume quota: If you have more instance quota, you can always boot it from an ephemeral disk even if you don’t have any volume quota left.
  • Are destroyed when the instance is terminated: This means you will loose your data if you want to delete an instance to free up some instance quota.

Volume Boot Disks

Volumes are a more permanent form of storage than ephemeral disks and can be used to boot from as well as a mountable block device.

Volume boot disks are useful if you need an easy way to duplicate instances and back them up with snapshots, or if you need a more reliable storage solution for your instance than an ephemeral disk. If you use them, you should plan ahead so that you have enough quota for all of the instances you want to boot.

  • Can be snapshotted: Useful for duplicating instances or having a copy of an instance at a certain point in time.
  • Does not get destroyed when you delete the instance (Unless you select the “Delete Volume on Instance Delete” option): You can delete the instance and your data will still exist as a volume that you can boot from later.
  • Uses your volume quota: This can be pricey if you have lots of instances, or take lots of snapshots.

Source – https://help.dreamhost.com/hc/en-us/articles/217701757-What-s-the-difference-between-ephemeral-and-volume-boot-disks-

Tagged : / / / /

How to Setup AWS Credentials using AWS Command Line Interface?

setup-aws-credentials-using-aws-command

Setup AWS Credentails using AWS Command Line Interface

Install the AWS CLI Using Pip
Please click here complete installation guide.

Test the AWS CLI Installation

 $ aws help

Environment Variables – 

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Step 5: Get a key aws_access_key_id, aws_secret_access_key, region from AWS website, under your 

$ aws configure

Step 6: Setup AWS with key

$  aws configure
AWS Access Key ID [None]: AKIAJB6WCXXXXRKRT5SQ
AWS Secret Access Key [None]: fDBVPhlHzMk70ip5FGHDl/AcmEyMnylwOllc+n4s
Default region name [None]: us-east-1
Default output format [None]:
$  aws s3 list

Step 7: Verify details in ~/.aws/credentials and ~/.aws/config

$ more ~/.aws/credentials
[default]
aws_access_key_id = AKIAJB6WCXXXXRKRT5SQ
aws_secret_access_key = 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

$  more ~/.aws/config
[default]
region = us-east-1

Step 8: Verify AWS CLI setup

$ aws ec2 describe-instances --output table --region us-west-2

The AWS credentials file –

Located at ~/.aws/credentials on Linux, OS X, or Unix, or at C:\Users\USERNAME \.aws\credentials on Windows. This file can contain multiple named profiles in addition to a default profile.

The CLI configuration file –

Typically located at ~/.aws/config on Linux, OS X, or Unix, or at C:\Users\USERNAME \.aws\config on Windows. This file can contain a default profile, named profiles, and CLI specific configuration parameters for each.

Reference
http://docs.aws.amazon.com/cli/latest/userguide/installing.html
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html

Tagged : / / / / / / / / / / / / / /