1. Step: Create AWS Container & EC2 Instance - koglak/SWE573 GitHub Wiki
INITIAL STEPS
1. Complete Docker step: Docker Tutorial
2. Create AWS account: AWS Account
3. Download AWS CLI and test if you downloaded with cmd: AWS CLI
aws --version
CREATE ECR CONTAINER
4. Go AWS Management Console and Select Elastic Container Registry (ECR)
5. Create Repository
6. Container is ready.
7. Select New Repository and click the "View push Commands"
8. Push your local image to AWS Container
You don't need to push your postgresql image. AWS has ready-to-use one. Just push your website image. Ignore 2nd step at "View push commands" instruction. You already have an docker container. You should follow:
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin <repository_url>
docker tag <your local docker image> <repository_url/repository_name>
docker push <repository_url/repository_name>
9. Click your repository name, you should see the pushed image.
You can redo 8th step when you revised your local image.
CREATE YOUR INSTANCE
10. Go AWS Management Console and Select EC2
11. Click "Launch Instance" and name it
12. "Create New Key Pair"
**13. Name the keypair and download .pem file"
14. Select all of them.
**15. Click "advanced details" and create new IAM user.
16. Go to IAM User new Tab, click users and add user.
17. Name new user such as SSMRole
18. Set the user permission as below and create it.
19. Turn back to previous instance creation page and select new created IAM user
20. Finally "Launch Instance."