bcgov / moh-aws-devops

Collection of AWS DevOps scripts/tools
Apache License 2.0
0 stars 0 forks source link
aws aws-lambda hlth

Lifecycle:Stable

This repo holds Lambda scripts for turning off services (eg AWS Fargate [containers], AWS Aurora [databases]) to save money (eg dev, test environments that don't need to be operational all the time).

Table of Contents

  1. Cross-account and Cross-region Events
  2. Aurora_Stop
  3. Fargate_Stop

Cross-account and Cross-region Events

By default, Lambda/CloudWatch/EventBridge will only execute with the same project set/space. In order to centralize/consolidate the Lambda and CloudWatch/EventBridge, the architecture requires three accounts:

The flow has four steps:

  1. EventSender Lambda is triggered.
  2. EventSender Lambda sends an event towards the global event bus.
  3. Global event bus forwards the event to a target event bus.
  4. The target event bus forwards the event to Event Receiver Lambda.

Step-by-step instructions: https://repost.aws/articles/ARIw6q_ozaTmqqI25Eq4YIcQ/a-step-by-step-guide-to-cross-account-and-cross-region-events-with-eventbridge

:arrow_up: Back to Top

Aurora_Stop

This script takes arguments via CloudWatch/EventBridge:

:arrow_up: Back to Top

Fargate_Stop

This script takes arguments via CloudWatch/EventBridge:

:arrow_up: Back to Top