ministryofjustice / modernisation-platform

A place for the core work of the Modernisation Platform • This repository is defined and managed in Terraform
https://user-guide.modernisation-platform.service.justice.gov.uk
MIT License
683 stars 290 forks source link

Automatically schedule customer EC2 instances to stop / start #1844

Closed dms1981 closed 2 years ago

dms1981 commented 2 years ago

User Story

As a modernisation platform engineer I want to schedule the operating hours of modernisation platform EC2 instances So that we can deliver a sustainable platform

User Type(s)

Modernisation Platform engineer Modernisation Platform customer

Value

Non-production instances should not need to be run outside of office hours Production instances should not need to be run outside of service hours Shutting down instances when they are not required offers better value for money to the Ministry of Justice, aligns with our sustainability goals of not consuming resources when they are not required, and aids with work/life balance

Questions / Assumptions / Hypothesis

Definition of done

Reference

How to write good user stories Scheduling shutdown AWS EC2 at night

dms1981 commented 2 years ago

See https://github.com/ministryofjustice/modernisation-platform/issues/2054 - this story will ensure that the scheduler has the appropriate limited permissions it will require

gfou-al commented 2 years ago

https://github.com/ministryofjustice/modernisation-platform-instance-scheduler

davidkelliott commented 2 years ago

ADR here https://github.com/ministryofjustice/modernisation-platform/blob/main/architecture-decision-record/0021-use-a-go-lambda-for-instance-scheduling.md