danilop / multimodal-chat

A multimodal chat interface with many tools.
MIT License
94 stars 11 forks source link

Replace the DELETE/CREATE ECR repo script with the fancy code that follows the "create-if-not-exist" pattern #4

Closed cfregly closed 2 months ago

danilop commented 2 months ago

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.

cfregly commented 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.

cfregly commented 2 months ago

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.