I used packer to upload a docker image I created to my AWS ECR repository.
How can I use the AWS cli to automatically locate that image, create a new cluster, set the port rules to allow all inbound and outbound traffic and then spin up the container? I want to automate this process so I can integrate it into packer later, as a post processor.
Can someone explain me how I can do this?
{
"type": "docker-push",
"ecr_login": true,
"aws_access_key": "<snip>",
"aws_secret_key": "<snipe>",
"login_server": "https://<snip>.dkr.ecr.eu-west-1.amazonaws.com/"
}
Currently the last part of my packer script just uploads the image - now I need a way to automatically start this docker image and make sure the network traffic settings are configured correctly.