-
Notifications
You must be signed in to change notification settings - Fork 5
Define Elastic Container Registry (ECR) lifecycle policy #17
Description
Overview
The beacons webapp/service project CI/CD pipelines push a new container image up to ECR on every commit. The reason for this is to allow Terraform to re-deploy the images easily when there is a change to the images. However, this does mean that the container registry will start to incur costs if we allow it to grow without a lifecycle policy in place.
AWS ECR Pricing Tier
AWS provides you with 500MB of free storage and then charges $0.10 per GB every month, see pricing.
As of 12/02/2020, we have:
- 16GB webapp (260 images at ~63MB)
- 9GB service (63 images at ~130MB)
Total: ~ $2.5 a month
This is over ~2 weeks of 4 devs full time so scaling out, based on that rate of increase, to a year will be:
($2.5 * 2 * 12) = $60 a year
Other Considerations
AWS provides 50GB of free storage for public ECR registries, this would effectively reduce the cost by $5 per year ($0.1*50GB = $5)