Search the AWS IP Ranges document for a specific IP.
Get all ECR images with more than 900 tags.
AWS has a hard limit of 1000 tags on any single image.
Attempting to push another tag on that image will result in an error like the following:
ERROR: failed commit on ref "index-sha256:......": unexpected status from PUT request to https://ACCOUNT_ID.dkr.ecr.REGION.amazonaws.com/v2/REPOSITORY/manifests/TAG_NAME: 403 Forbidden
In CloudTrail the error looks like:
#!/bin/bash | |
7zip_installed() { | |
builtin type -P "7zz" &> /dev/null | |
} | |
prompt_with_default() { | |
read -p "$1 ($2):" INPUT | |
if [ -z "$INPUT" ]; then | |
echo "$2" |
Format an AWS Usage Report for S3 charges to make it simpler to compare your usage to the public S3 Pricing page.
For example, the pricing page lists Tier 1 (i.e. PUT, COPY, POST, and LIST) requests at one cost and Tier 2 (GET, SELECT, and all others) requests at a different cost. However, the Usage Report lists requests by API call (e.g. GetObject, ListBucket, etc). This is a bit annoying, so this script parses them into their respective billing tiers.
- Navigate to AWS Billing. Select "Cost & usage reports" then "Create a usage report"
- Enter "Amazon Simple Storage Service" as the Service, "All usage types" for the Usage Type, "All Operations" for the Operations. Then select a time period and granularity.
import boto3 | |
client = boto3.client('route53') | |
def get_zones(): | |
paginator = client.get_paginator("list_hosted_zones") | |
for page in paginator.paginate(): | |
yield from page["HostedZones"] | |
def get_records(zone_id): |
/* | |
1. Open the playlist in Spotify Web (logged in if it's a private playlist) | |
2. Paste this in the browser's Developer Tools | |
For playlists longer than a handful of tracks, the entire track list won't be loaded in the DOM. | |
Scrolling down the page will rows from the top and vice versa. Therefore you will need to run this, | |
scroll down on the page to the last track outputted, run it again, etc until you get them all, then | |
combine the results together. | |
*/ |
I hereby claim:
- I am gurchik on github.
- I am gurchik (https://keybase.io/gurchik) on keybase.
- I have a public key ASC5ck8vPIzBuufV6z_77jz1rt3Wc5r9QKF72JxMkgwXKQo
To claim this, I am signing this object:
; Allow the linker to find the _start symbol. The linker will begin program execution | |
; there. | |
global _start | |
; Start the .data section of the executable, which stores constants (read-only data) | |
; It doesn't matter which order your sections are in, I just like putting .data first | |
section .rodata | |
; Declare some bytes at a symbol called error_msg. NASM's db pseudo-instruction | |
; allows either a single byte value, a constant string, or a combination of the two | |
; as seen here. 0xA = new line, and 0x0 = string-terminating null |
; Allow the linker to find the _start symbol. The linker will begin program execution | |
; there. | |
global _start | |
; Start the .data section of the executable, which stores constants (read-only data) | |
; It doesn't matter which order your sections are in, I just like putting .data first | |
section .rodata | |
; Declare some bytes at a symbol called hello_world. NASM's db pseudo-instruction | |
; allows either a single byte value, a constant string, or a combination of the two | |
; as seen here. 0xA = new line, and 0x0 = string-terminating null |