Amazon upload

Django S3

Time Limited Signed UR–how-to-generate-url-for-amazon-s3-files.html

AWS SDK for Python (Boto)

sign URLs with an IP


session based authorization

download private file


Amazon EC2

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud.

It is designed to make web-scale cloud computing easier for developers.

Amazon EBS

Amazon Elastic Block Store (Amazon EBS) provides persistent block level storage volumes

for use with Amazon EC2 instances in the AWS Cloud.

Each Amazon EBS volume is automatically replicated within its Availability Zone to protect you from component failure,

offering high availability and durability. Amazon EBS volumes offer the consistent

and low-latency performance needed to run your workloads.

With Amazon EBS, you can scale your usage up or down within minutes –

all while paying a low price for only what you provision.



How to serve your media files via Amazon’s Simple Storage Service

### ###

### ###



### AWS RDS Postgres DB instance





### ###

### ###

Deploying a Django app on Amazon EC2 instance—amazon_app ###

Amazon ECS

Identity and Access Management

Before the Amazon ECS agent can register container instance into a cluster, the agent must know which account credentials to use.

You can create an IAM role that allows the agent to know which account it should register the container instance with.

When you launch an instance with the Amazon ECS-optimized AMI provided by Amazon using this role, the agent automatically registers the container instance into your default cluster.

The Amazon ECS container agent also makes calls to the Amazon EC2 and Elastic Load Balancing APIs on your behalf, so container instances can be registered and deregistered with load balancers. Before you can attach a load balancer to an Amazon ECS service, you must create an IAM role for your services to use before you start them.

This requirement applies to any Amazon ECS service that you plan to use with a load balancer.

Amazon EC2 Role for EC2 Container Service Role to allow EC2 instances in an Amazon ECS cluster to access Amazon ECS.

Distance To Vancouver From Oregon is: 1692 miles / 2723.01 km / 1470.31 nautical miles

Distance To Virginia From Vancouver is: 1725 miles / 2776.12 km / 1498.98 nautical miles

Distance To Vancouver From California is: 2403 miles / 3867.25 km / 2088.15 nautical miles

# Virginia


aws configure aws ecr get-login –region us-east-1

Effective today, Amazon ECR is available in US East (Northern Virginia) with more regions on the way soon!

Your Amazon ECS tasks run on container instances (Amazon EC2 instances that are running the ECS container agent).

A service lets you specify how many copies of your task definition to run. You could also use Elastic Load Balancing to distribute incoming traffic to your tasks. Amazon ECS keeps that number of tasks running and coordinates task scheduling with the load balancer.

Task definitions specify the container information for your application, such as how many containers are part of your task, what resources they will use, how they are linked together, and which host ports they will use

After you create a cluster, you can launch container instances, and then run tasks


If a storage volume on your primary fails in a Multi-AZ deployment, Amazon RDS automatically initiates a failover to the up-to-date standby. Compare this to a Single-AZ deployment: in case of a Single-AZ database failure, a user-initiated point-in-time-restore operation will be required. This operation can take several hours to complete, and any data updates that occurred after the latest restorable time (typically within the last five minutes) will not be available.

EC2 Container Service

$ sudo apt-cache search awscli
awscli - Universal Command Line Environment for AWS

$ sudo apt-get install awscli

$ aws --version
aws-cli/1.10.1 Python/3.5.1+ Linux/4.4.0-1-amd64 botocore/1.3.23

$ aws configure
AWS Access Key ID []: ****************
AWS Secret Access Key []: ****************
Default region name [oregon]: us-west-2
Default output format [json]:

$ aws iam list-users

$ aws ecs create-cluster help
$ aws ecs list-container-instances help

$ aws ecs create-cluster --cluster-name demo-01
    "cluster": {
        "pendingTasksCount": 0,
        "runningTasksCount": 0,
        "clusterName": "demo-01",
        "status": "ACTIVE",
        "clusterArn": "arn:aws:ecs:us-west-2:642913345125:cluster/demo-01",
        "activeServicesCount": 0,
        "registeredContainerInstancesCount": 0

$ aws ecs list-container-instances --cluster demo-01

Within ECS, you create task definitions, which are very similar to a docker-compose.yml file. A task definition is a collection of container definitions, each of which has a name, the Docker image to run, and options to override the image’s entrypoint and command. The container definition is also where you define environment variables, port mappings, volumes to mount, memory and CPU allocation, and whether or not the specific container should be considered essential, which is how ECS knows whether the task is healthy or needs to be restarted.

You can set up multiple container definitions within the task definition for multi-container applications. ECS knows how to pull from the Official Docker Hub by default and can be configured to pull from private registries as well. Private registries, however, require additional configuration for the Docker client installed on the EC2 host instances.

Once you have a task definition, you can create a service from it. A service allows you to define the number of tasks you want running and associate with an Elastic Load Balancer (ELB). When a task maps to particular ports, like 443, only one task instance can be running per EC2 instance in in the ECS cluster. Therefore, you cannot run more tasks than you have EC2 instances. In fact, you’ll want to make sure you run at least one less task than the number of EC2 instances in order to take advantage of blue-green deployments. Task definitions are versioned, and Services are configured to use a specific version of a task definition.