The idea is to stop/shutdown any resources (such as EC2 instances, RDS databases, ECS tasks, etc.) when you're done for the day and restore them back up next time you continue.
Currently it's in a very early stage, a hobby side-project :)
Ideally I'm thinking to provide a CloudFormation template or terraform config for example, to provision a scheduled Lambda with predefined "start of work" and "end of work" times and have it automatically do that for you.
I'd like to know if something like this would be useful for you too and what do you think about it?
I had been looking at creating a lamba to check for the existence of pods, services, alternate namespaces etc., as I learn K8s on AWS, to shut down the cluster when I'm not working on it.
Im very interested in learning about your work flows, like how does a typical day look like? I do all my work on a local pc and only use servers for production. So im interesting in how/why you use the cloud stack
interesting work! i feel like this can't be a new problem. what comparable tools exist for doing this today? its basically just spinning up a staging env while you work and spinning down when you knock off work right? almost like a heroku dyno spinning up for you.
That's a good alternative for EC2 / RDS instances but when it comes to other cases like DynamoDB provisioned throughput or Kinesis shards or ElastiCache it wouldn't help much
Ops people need a Dev environment to test, especially for Infrastructure as code. With an increased connectivity between developer code and Infrastructure, I prefer my team finds out everything in a development environment that's exactly like staging and prod. That way deployment to staging is proof of the IAC change. There's less risk.
This also lets developers try out new services in the cloud without impacting the staging... (This is on top of a sandbox for research, but integration of research takes time and an environment too)
I guess depends on the size of the company. How else would you constantly test integrations between different services? Especially if some services can't be easily ran on the laptop.
Also if you add terraform/ansible and all that jazz to the table. Where else? Infra team needs dev/stage as well.
It’s super useful to be able to spin up a dev environment for doing things like experimenting with the performance impact of different configs. It’d be annoying and potentially disruptive to other team members to do that on staging.
It looks like a nice tool doing it's job well :-) I'd also consider services like provisioned DynamoDB tables or Kinesis streams in this context because there you can also waste lots of money depending on your setup. For example, you could decrease the provisioned read/write capacity for a DynamoDB table or decrease the shards of a Kinesis stream over night. I've discussed these topics in a blog post, in the context of a CloudFormation stack, if anyone's interested: https://www.sebastianhesse.de/2018/04/22/shut-down-cloudform...
Great addition to pile of scripts to take with you on problem solving missions. I have something similar, but written in terraform.
WRT AWS cost visibility, I find it is usually faster to spin up and grab most of the relevant information using mlabouardy's [komiser](https://github.com/mlabouardy/komiser) than to try and standardize yourself.
Not shilling, just a tool I like.
If you're using IaC and have it set up in a CI/CD pipeline, you could also achieve the same by having a cronjob set a flag outside of work hours, and use conditionals in your IaC based on the value of that flag (e.g., for Terraform `count = var.scale_down ? 0 : 1`)
While this only works with instances, I usually just cron the shutdown command with a future time. Nice thing is, if working late I give myself a couple hour window to cancel shutdown on any nodes I'm still using.
I find it price gouging that AWS doesn't already implement this on their own within their pricing structure and that you need a 3rd party tooling to do this.
It allows you to create automatic start and stop schedules for your Amazon EC2 and Amazon RDS instances. It uses a combination of CloudWatch/Lambda/DynamoDB to check against tagged instances.
If you don't like their prices, why don't you just switch to another provider? Plenty of good clouds. And even more dedicated / VPS servers, if you want truly crazy savings.
[+] [-] aramalipoor|5 years ago|reply
https://github.com/aramalipoor/aws-cost-saver
The idea is to stop/shutdown any resources (such as EC2 instances, RDS databases, ECS tasks, etc.) when you're done for the day and restore them back up next time you continue.
Currently it's in a very early stage, a hobby side-project :)
Ideally I'm thinking to provide a CloudFormation template or terraform config for example, to provision a scheduled Lambda with predefined "start of work" and "end of work" times and have it automatically do that for you.
I'd like to know if something like this would be useful for you too and what do you think about it?
[+] [-] vageli|5 years ago|reply
[0]: https://cloudcustodian.io/
[+] [-] WrtCdEvrydy|5 years ago|reply
Edit: I wonder if you could put this inside of a lambda with just a role.
[+] [-] adamlklein|5 years ago|reply
I had been looking at creating a lamba to check for the existence of pods, services, alternate namespaces etc., as I learn K8s on AWS, to shut down the cluster when I'm not working on it.
[+] [-] z3t4|5 years ago|reply
[+] [-] swyx|5 years ago|reply
[+] [-] gvenkat|5 years ago|reply
https://aws.amazon.com/solutions/implementations/instance-sc...
[+] [-] aramalipoor|5 years ago|reply
[+] [-] fareesh|5 years ago|reply
[+] [-] ldoughty|5 years ago|reply
This also lets developers try out new services in the cloud without impacting the staging... (This is on top of a sandbox for research, but integration of research takes time and an environment too)
[+] [-] vitalysh|5 years ago|reply
Also if you add terraform/ansible and all that jazz to the table. Where else? Infra team needs dev/stage as well.
[+] [-] mcintyre1994|5 years ago|reply
[+] [-] carnitas|5 years ago|reply
[+] [-] weeefun|5 years ago|reply
[+] [-] aramalipoor|5 years ago|reply
[+] [-] iflowfor8hours|5 years ago|reply
[+] [-] stekern|5 years ago|reply
[+] [-] aramalipoor|5 years ago|reply
1) Using conditionals to achieve this usually makes terraform unmanageable specially if your terraform is complex.
2) Sometimes you'd need to do more complex steps to save some money, for example in case of ElastiCache you'd need to snapshot/delete/create.
3) Using terraform in a Lambda to schedule this was not straightforward (in my current company) so I gave up making it work :D
[+] [-] kevin_nisbet|5 years ago|reply
echo "0 22,0,2,4,6,8,10 * * * /sbin/shutdown +115" > /etc/cron.d/autoshutdown
I'm all for a better tool, just wanted to point out a builtin alternative.
[+] [-] ngcc_hk|5 years ago|reply
[+] [-] gbolo|5 years ago|reply
[+] [-] dabeeeenster|5 years ago|reply
+1 to add in:
- Elasticache instances - Load balancers associated with ECS clusters
[+] [-] chromedev|5 years ago|reply
[+] [-] 60secz|5 years ago|reply
[+] [-] debaserab2|5 years ago|reply
[+] [-] barkingcat|5 years ago|reply
[+] [-] aynsof|5 years ago|reply
It allows you to create automatic start and stop schedules for your Amazon EC2 and Amazon RDS instances. It uses a combination of CloudWatch/Lambda/DynamoDB to check against tagged instances.
[+] [-] aliswe|5 years ago|reply
[+] [-] bufferoverflow|5 years ago|reply
[+] [-] pc86|5 years ago|reply
[+] [-] cybrix|5 years ago|reply