a simple node js app
- create ec2 instance. Use the bash script which runs the Dockerfile,
- load the dockerfile and check the image
- once image is built push the docker to elastic container registry (ECR) 2a. login to AWS
- Update lambda ?
- After the inital start up, you might want to check the startup logs to check for errors: vi /var/log/cloud-init-output.log
- Login to aws: aws configure
- Login to ecr: sudo $(aws ecr get-login --region us-east-1 --no-include-email)
- Tag docker image: sudo docker tag .dkr.ecr.us-east-1.amazonaws.com/nodetest -- Note: you can go to AWS ECR repos to get URL above.
- Push docker to ecr: sudo docker push .dkr.ecr.us-east-1.amazonaws.com/
- Update lambda function with latest docker image (this has to be done manually)