Skip to content

Instantly share code, notes, and snippets.

@s2krish
s2krish / playwright_with_AWS_EB.config
Last active September 2, 2022 04:42
playwright with AWS EB
# Customizing Amazon Linux 2 to setup playwright
# config file should be in [project_root]/.ebextensions/command.config
packages:
yum:
python3-devel: []
at-spi2-atk: []
cups-devel: []
libxkbcommon: []
libXcomposite: []
@s2krish
s2krish / automated-ec2-backup
Last active September 2, 2022 04:45
Automated backup of EC2 Volume for last seven days using AWS CloudWatch
'''
This is tiny script (self note) for automated back of AWS EC2
1. Create Lambda function. Visit https://us-west-2.console.aws.amazon.com/lambda/home
2. Assigned right AIM role (should have sufficient privileges). Visit https://console.aws.amazon.com/iam/home?#/roles)
3. Set to schedule run from CloudWatch Event. Visit https://us-west-2.console.aws.amazon.com/cloudwatch/home
'''
import boto3
import datetime