Hi everyone,

I’m trying to deploy an application on a single EC2 instance and reduce costs by stopping the instance when it’s idle, then automatically starting it again when someone calls my API over HTTPS. I’ve made some progress, but I’m stuck on the last part and would appreciate advice on the right architecture or patterns.

*What I want to achieve * Automatically stop the EC2 instance when it’s idle (for example, CPU utilization < 5%).

When an incoming HTTPS request hits my API:

The EC2 instance should be started automatically if it’s stopped.

The request should eventually be served by the application running on that EC2 instance.

*What I’ve already done * I successfully auto-stop the EC2 instance using a CloudWatch alarm that triggers StopInstances.

I created a…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help