|
| 1 | +{ |
| 2 | + "title": "Automated EBS Snapshot Creation on EC2 Shutdown using EventBridge", |
| 3 | + "description": "This pattern deploys an EventBridge rule that automatically creates EBS snapshots when an EC2 instance shuts down using direct EBS target integration.", |
| 4 | + "language": "YAML", |
| 5 | + "level": "100", |
| 6 | + "framework": "AWS SAM", |
| 7 | + "introBox": { |
| 8 | + "headline": "How it works", |
| 9 | + "text": [ |
| 10 | + "This pattern creates an automated EBS snapshot system using EventBridge event-driven rules with direct EBS target integration.", |
| 11 | + "The EventBridge rule monitors EC2 instance state changes and triggers when an instance enters shutting-down or stopping state.", |
| 12 | + "The solution requires Volume ID and Instance ID parameters and uses pure infrastructure-as-code approach without Lambda functions." |
| 13 | + ] |
| 14 | + }, |
| 15 | + "gitHub": { |
| 16 | + "template": { |
| 17 | + "repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/sam-eventbridge-ebs-snapshot", |
| 18 | + "templateURL": "serverless-patterns/sam-eventbridge-ebs-snapshot", |
| 19 | + "projectFolder": "sam-eventbridge-ebs-snapshot", |
| 20 | + "templateFile": "template.yaml" |
| 21 | + } |
| 22 | + }, |
| 23 | + "resources": { |
| 24 | + "bullets": [ |
| 25 | + { |
| 26 | + "text": "Amazon EventBridge Event Rules", |
| 27 | + "link": "https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html" |
| 28 | + }, |
| 29 | + { |
| 30 | + "text": "Amazon EBS Snapshots", |
| 31 | + "link": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html" |
| 32 | + }, |
| 33 | + { |
| 34 | + "text": "EventBridge Built-in Targets", |
| 35 | + "link": "https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-targets.html" |
| 36 | + } |
| 37 | + ] |
| 38 | + }, |
| 39 | + "deploy": { |
| 40 | + "text": [ |
| 41 | + "sam build", |
| 42 | + "sam deploy --guided" |
| 43 | + ] |
| 44 | + }, |
| 45 | + "testing": { |
| 46 | + "text": [ |
| 47 | + "Stop or terminate the monitored EC2 instance after deployment.", |
| 48 | + "Check EC2 console snapshots section - snapshot will be created when instance shuts down." |
| 49 | + ] |
| 50 | + }, |
| 51 | + "cleanup": { |
| 52 | + "text": [ |
| 53 | + "sam delete", |
| 54 | + "Note: Existing snapshots must be deleted manually if needed." |
| 55 | + ] |
| 56 | + }, |
| 57 | + "authors": [ |
| 58 | + { |
| 59 | + "name": "Anirudh Gupta", |
| 60 | + "image": "https://drive.google.com/file/d/1aQKx3aY2ID25FpsDI1HS_wSxgIMxOq9J/view?usp=sharing", |
| 61 | + "bio": "Technical Account Manager at AWS", |
| 62 | + "linkedin": "anirudh-gupta-13a0b111a" |
| 63 | + } |
| 64 | + ], |
| 65 | + "patternArch": { |
| 66 | + "icon1": { |
| 67 | + "x": 20, |
| 68 | + "y": 50, |
| 69 | + "service": "ec2", |
| 70 | + "label": "Amazon EC2" |
| 71 | + }, |
| 72 | + "icon2": { |
| 73 | + "x": 80, |
| 74 | + "y": 50, |
| 75 | + "service": "eventbridge", |
| 76 | + "label": "Amazon EventBridge" |
| 77 | + }, |
| 78 | + "line1": { |
| 79 | + "from": "icon1", |
| 80 | + "to": "icon2", |
| 81 | + "label": "state change" |
| 82 | + } |
| 83 | + } |
| 84 | +} |
0 commit comments