How can I reduce costs of AWS ECR and Secrets Manager with a private Fargate setup?

0
11
Asked By CuriousCoder123 On

I'm working on a side project and trying to balance security and cost on AWS. My setup includes both RDS and Fargate running in private subnets, and I opted out of creating a NAT Gateway to avoid those extra costs since I don't need outbound internet access right now. To allow Fargate to pull images and access secrets, I set up VPC interface endpoints for ECR and Secrets Manager.

While the service deploys correctly, these endpoints remain idle once the service is running, and they still rack up hourly charges, which isn't ideal for a small project. I'm looking for ways to minimize or avoid these endpoint costs while keeping my Fargate tasks private. Any tips or cost-saving strategies would be greatly appreciated!

2 Answers

Answered By TechWhiz42 On

VPC endpoints like the ones you've set up always come with costs, so that's a trade-off for using private networking. If you're looking to avoid those fees, consider using a public subnet for some tasks if security is manageable. You could also switch to a self-hosted solution for container images and secrets. For instance, using S3 with a gateway endpoint is free for storage and can cut some costs. Just remember, there’s no easy way to have it all—private setup, low cost, and managed services.

Answered By CodeMaster77 On

Instead of using Secrets Manager, try using encrypted SSM parameters; they won't cost you anything. Just keep in mind that if you're in a strictly private VPC, you'll still need a private endpoint to access them. It’s a bit of a balancing act between wanting privacy and keeping costs down, but SSM can help you save some money!

DevGuru15 -

That's a fair point, but having no IGW or NAT means public access for SSM won't work. You still need those private endpoints to interact with SSM effectively.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.