EddieTheCubeHead / Stagnum

A website utilizing Spotify web API to transfer playback from a queue into a shareable pool.
Other
1 stars 0 forks source link

[Infra]: Cost optimizing AWS #336

Closed ekosfin closed 1 month ago

ekosfin commented 2 months ago

Contact details

No response

Addressed problem

Currently InfraCost estimates the monthly cost to be 75$. For the usage of this project that is not reasonable cost.

Feature description

As things stand using ECS is costing roughly 20$ for both front and backend. However, the terraform is configured such that both have their own application load balancers (ALB) that cost 20$ each. I would recommend, just forgoing ECS and moving the infra to one EC2 instance. This will be more prone to downtime as the whole infra would be reliant on one availability zone, however considering the lack of criticality this seems like a good trade off. I estimate the cost to go down to 10-20$ with this architecture.

Alternative solutions

The ECS could be also configured to use one ALB instead of two. This would bring the cost down to roughly 55$

Additional information

No response