Preparation

Prepare AWS environment and IAM user has full permission to access another resource in the console. AWS

Source code https://github.com/hs-nguyen/Host-a-Static-Web-App-on-AWS-with-Docker-and-AWS-ECS.git

Register domain name at Route 53

Here, domain name: cloud-sangnguyen.click DNS

To EC2 instance to be able to work with AWS ECR, we need to give permission to our instance.

In this preparation, we need to create IAM role to grant to EC2 instance.

IAM role

  • Choose IAM on console
    • Click Create role IAM role
    • Trusted entity type: AWS Service
    • Use case: EC2 IAM role
    • Add permissions: “EC2InstanceProfileForImageBuilderECRContainerBuilds” IAM role
    • Role name: IAM-role-allow-EC2-Access-to-ECR
    • Preview IAM role => Create role IAM role IAM role
  • Confirm IAM role IAM role