Skip to content

Instantly share code, notes, and snippets.

View Pabl0Aceved0's full-sized avatar
😃

Pabl0Aceved0

😃
View GitHub Profile
@Pabl0Aceved0
Pabl0Aceved0 / aws_ssm_automation
Last active June 5, 2025 01:31
Below is a runbook for AWS Systems Manager Automation to terminate EC2 instances that have been stopped or unused for a specified duration. This runbook uses AWS Lambda to check the instance's stopped duration and terminates it if it exceeds a defined threshold (e.g., 7 days). The runbook is written in YAML, as is standard for AWS Systems Manage…
description: Terminates EC2 instances stopped for more than a specified number of days.
schemaVersion: '0.3'
assumeRole: "{{ AutomationAssumeRole }}"
parameters:
AutomationAssumeRole:
type: String
description: (Optional) The ARN of the role that allows Automation to perform the actions on your behalf.
default: ''
MaxStoppedDays:
type: Integer
@Pabl0Aceved0
Pabl0Aceved0 / yaml
Created May 6, 2025 23:48
AWS Backup Automation with Well-Architected Enhancements
AWSTemplateFormatVersion: 2010-09-09
Description: Advanced automation for backup, restore testing, and cleanup of EBS volumes with multi-volume support, reporting integration, and Well-Architected enhancements
Parameters:
BackupVaultName:
Type: String
Default: MyBackupVault
Description: Name of the backup vault
BackupRuleName:
Type: String
@Pabl0Aceved0
Pabl0Aceved0 / AWS-Backup-Centralized-POC-Template
Last active May 13, 2025 23:38
AWS backup - Centralized - POC - Template
AWSTemplateFormatVersion: 2010-09-09
Description: Backup Plan template to back up all resources
Outputs: {}
Parameters:
BackupAccountEventBus:
Type: String
Description: Event Bus in Backup Account