Table of Content
AWS setup
sign up a aws account
Open https://aws.amazon.com/, and then choose Create an AWS Account
Create an IAM User
- AWS account root user, single sign-in identity that has complete access to all AWS services and resources in the account.
- IAM user,Identity and Access Management (IAM), create an IAM user, and then add the user to an IAM group with administrative permissions or grant this user administrative permissions. You can then access AWS using a special URL and the credentials for the IAM user.
Here is example for my IAM user,
IAM user: oldhorse Group: Administrators policy: AdministratorAccess add user oldhorse to Administrators group IAM user Console access https://xxxxxxx.signin.aws.amazon.com/console
ECS
Amazon Elastic Container Service (Amazon ECS)
- Amazon Web Service
- run Docker applications on a scalable cluster
ECR
Amazon Elastic Container Registry (Amazon ECR) to create an image repository and push an image to it as part of the first run wizard
https://console.aws.amazon.com/ecs/home#/firstRun
Create a task definition
A task definition is like a blueprint for your application
basically use default setting, will build up a container cluster default.
test web app
From load balancer, find DNS and type in web browser,
ECS-first-run-alb-xxxxxxxx.ca-central-1.elb.amazonaws.com
will get this,
Amazon ECS Sample App Congratulations! Your application is now running on a container in Amazon ECS.
Delete Resources
delete service/cluster
- Amazon ECS console page
- select service and click Update
- set the Number of tasks to 0 and select Update Service
- after you update your service, select Delete
- delete cluster
delete ec2 instance
- go to EC2 console
- stop and terminate instance
delete load balancer
- go to EC2
- go to Load Balancing
- delete load balancer and target groups
deregister
- go to ECS
- Task Definitions
- select task definition console-sample-app-static, from Action click Deregister