InvestPro IaC with ECS Build Docker Images and Push to the ECR Configure your AWS Credentials: aws configure Login to the ECR: aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 657608969216.dkr.ecr.us-east-1.amazonaws.com/invest-pro-api Build and Push the Docker Image: export VERSION="0.0.2" export REPOSITORY="657608969216.dkr.ecr.us-east-1.amazonaws.com/invest-pro-api" docker build -t invest-pro-api:$VERSION . docker tag invest-pro-api:$VERSION $REPOSITORY:$VERSION docker tag invest-pro-api:$VERSION $REPOSITORY:latest docker push "$REPOSITORY":"$VERSION" docker push "$REPOSITORY":latest SSH to the EC2 Instance cd Projects ssh -i "gbrotas-keypair.pem" [email protected] Obtain SSL Certificate sudo yum install -y nginx certbot python-certbot-nginx sudo certbot certonly --nginx -d myportfolio-api.brottas.com