Skip to content

Instantly share code, notes, and snippets.

@chadbrewbaker
Last active March 14, 2022 18:30
Show Gist options
  • Save chadbrewbaker/9873452f4cd952cbd10a42ad23bd6490 to your computer and use it in GitHub Desktop.
Save chadbrewbaker/9873452f4cd952cbd10a42ad23bd6490 to your computer and use it in GitHub Desktop.
AWS Pi Day 2022

AWS Pi Day 2022

Registration Link

Twitch Link

# Intelligent data tiering
aws s3api put-bucket-intelligent-tiering-configuration

New features

The first line is optional to take command line arguments. They must be prefixed with ";ARGS "

;ARGS (your command line arguments here)
(Your SMTlib script here)

https://github.com/aws-samples/amazon-s3-object-lambda-default-configuration/blob/e8552a8354a453dd82dfc93c4efe4e4b48d36a1c/function/python_3_9/src/transform/transform.py#L8

# Python version (livecoding this during the day)
import re
# https://github.com/psf/requests 
# def transform_object(original_object: requests.?.response.content) -> ?:  
def transform_object(original_object):
    default_args = " -smt2 -in " 
    # TODO: Implement your own transform function
    #https://rubular.com
    x = re.search("\A(;ARG).*$", original_object)
    if x:
       print("use custom command line arguments")
     
    transformed_object = original_object
    return transformed_object
// Rust version (livecoding this during the day)

Misc notes

# Anonymous listing
aws s3 ls --no-sign-request s3://irs-form-990/

# Get a presigned URI to grant temporary permisssions for one week
aws s3 presign s3://awsexamplebucket/test2.txt --expires-in 604800
  • Example of how to do HTTP range queries to walk a b-tree in a sqlite file on S3 and only download byte ranges you need instead of the whole file.

  • Survey of S3, IOT, and Kinesis data ingress cost and performance.

  • Knapkin Math Github repository. Contribute S3 latency/bandwidth numbers and compare to EBS, ECR, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment