- First script can only update the storage class of files smaller than 5GB
- Second one uses multipart_copy to split files in 10MB parts and copy them one by one
- Third script tries to do the multipart_copy with a pool of threads. this one is not fully tested as Lambda does not give access to /dev/shm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /// script | |
# dependencies = [ | |
# "boto3", | |
# ] | |
# /// | |
from __future__ import annotations | |
import argparse | |
import datetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
policies: | |
- name: rds-instance-encryption-disabled | |
description: Account {account_id} - Detect RDS instances that do not have storage encryption enabled | |
resource: rds | |
filters: | |
- type: value | |
key: StorageEncrypted | |
value: false | |
- name: rds-instance-publicly-accessible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { chromium } = require('playwright'); | |
if (process.argv.length !== 3) { | |
console.error('Expected exactly one argument!'); | |
process.exit(1); | |
} | |
(async () => { | |
const browser = await chromium.launch(); | |
const context = await browser.newContext(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# Checkly API reference: https://www.checklyhq.com/docs/api | |
import datetime | |
import dateutil.parser as dp | |
import time | |
import numpy as np | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eEo pipefail | |
FILTER_VALUE="${1}" | |
INSTANCE_ATTRIBUTE="${2:-InstanceId}" | |
aws ec2 describe-instances --filters "Name=tag:Name,Values=$FILTER_VALUE" | jq -r ".Reservations[].Instances[].$INSTANCE_ATTRIBUTE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eEo pipefail | |
verify_mfa_arn () { | |
local MFA_ARN="$1" | |
if [ -z "$MFA_ARN" ]; | |
then | |
echo "You need to configure your MFA device for '$AWS_CLI_PROFILE' profile" | |
read -p "Enter the ARN of your MFA device: " MFA_ARN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is Git's per-user configuration file. | |
[user] | |
# Please adapt and uncomment the following lines: | |
name = | |
email = | |
signingkey = /Users/<user>/.ssh/id_ed25519.pub | |
[alias] | |
deleted = log --diff-filter=D --summary | |
a = add | |
st = status |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The name of our algorithm | |
algorithm_name=rmars | |
#set -e # stop if anything fails | |
account=$(aws sts get-caller-identity --query Account --output text) | |
# Get the region defined in the current configuration (default to us-west-2 if none defined) | |
region=$(aws configure get region) | |
region=${region:-us-west-2} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DOMContentLoaded | |
# Defined by the HTML specification: | |
# | |
# "The DOMContentLoaded reports the time when the initial HTML document has been completely loaded and parsed, | |
# without waiting for stylesheets, images, and subframes to finish loading." - MDN. | |
SELECT | |
SUM(fcp.density) | |
FROM | |
`chrome-ux-report.chrome_ux_report.201710`, |
NewerOlder