Closed cfregly closed 2 months ago
Right, but if I want to iterate quickly and add new functionality, I have to wait 10 mins each time for this process to delete, create, upload, and redeploy.
https://stackoverflow.com/questions/51028677/create-aws-ecr-repository-if-it-doesnt-exist
aws ecr describe-repositories --repository-names ${REPO_NAME} || aws ecr create-repository --repository-name ${REPO_NAME}
I suggest just warning the user that the old image will remain - and a small (super tiny) cost will be incurred. or give ppl the option to blow it away.
I delete/create repo becaus eotherwise a new image is added to the saem repo every time. I need to create a new image because the code of the Lambda function, or the list of Python modules to install in the image, can change. With delete/create, only one image is in the ECR repo, and there are no hidden costs for users.