aws

10 posts tagged “aws”.

  1. 2025
  2. Using boto3 from the command line

    I found a useful pattern today for automating more complex AWS processes as pastable command line snippets, using Boto3.

    1 min read
  3. Running OCR against a PDF file with AWS Textract

    Textract is the AWS OCR API. It's very good - I've fed it hand-written notes from the 1890s and it read them better than I could.

    2 min read
  4. Recovering data from AWS Lightsail using EC2

    I ran into problems with my AWS Lightsail instance: it exceeded the CPU burst quota for too long and was suspended, and I couldn't figure out how to un-suspend it.

    2 min read
  5. 2024
  6. Adding a CORS policy to an S3 bucket

    Amazon S3 buckets that are configured to work as public websites can support CORS, allowing assets such as JavaScript modules to be loaded by JavaScript running on other domains.

    2 min read
  7. Using S3 triggers to maintain a list of files in DynamoDB

    This is a three-quarters-baked experiment that I ran this morning. I'm interested in efficiently tracking which new files have been added to an S3 bucket, where that bucket could potentially hold…

    6 min read
  8. Deploying Python web apps as AWS Lambda functions

    I've been wanting to figure out how to do this for years. Today I finally put all of the pieces together for it. AWS Lambda can host functions written in Python.

    6 min read
  9. 2023
  10. Display EC2 instance costs per month

    The EC2 pricing page shows cost per hour, which is pretty much useless. I want cost per month. The following JavaScript, pasted into the browser developer console, modifies the page to show…

    1 min read
  11. Athena error: The specified key does not exist

    I was trying to run Athena queries against compressed JSON log files stored in an S3 bucket. No matter what I tried, I got the following error: The specified key does not exist.

    1 min read
  12. Helper function for pagination using AWS boto3

    I noticed that a lot of my boto3 code in s3-credentials looked like this: This was enough verbosity that I was hesitating on implementing pagination properly for some method calls.

    1 min read
  13. Querying newline-delimited JSON logs using AWS Athena

    I've been writing my Fly logs to S3 in newline-delimited JSON format using the recipe described in Writing Fly logs to S3. I recently needed to run a search against those logs.

    2 min read