user13486660
user13486660

Reputation:

What to do with an AWS Elastic Beanstalk environment when not in use?

I have an AWS Elastic Beanstalk env for a dev version of my application. I don't need it to be up all the time, but want to use it every now and again.

What can I do so that I will not be billed for it, but I don't have to keep remaking it over and over?

Thanks!!

Upvotes: 0

Views: 1161

Answers (2)

Marcin
Marcin

Reputation: 238319

The most cost-effective way is to setup the full environment in CloudFormation (or eb cli as @TomHarvey pointed out), which would fully automate provisioning and tearing down all the resources.

This way whenever you need it, you just provision it from scratch. When you are done with it, you just delete it fully and don't pay anything for it when not in use.

Also since its CloudFormation you can parametrize it to provision easily its different variants. For example, with tiny instances without load balancer for initial testing or development. At other times you can provision bigger environment if needed.

If you absolutely don't want to do anything manually, you can setup automatic provisioning of your stack at regular schedule, e.g. only on Monday during work ours. For this you could use CloudWatch Event scheduled rule with a lambda function which would deploy your template automatically as well delete it after hours.

Upvotes: 0

Tom Harvey
Tom Harvey

Reputation: 4332

You’ll have to stop the instances. Then restart them when you want them.

But, that comes with issues.

Your time is better spent making sure it can be rebuilt over and over again cleanly. Why do you want to avoid that rebuilding? Takes too long to rebuild? Or are there errors each time?

Are you using the eb-cli to make destroy and rebuild quicker and easier? https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3.html

Upvotes: 1

Related Questions