Skip to content

Instantly share code, notes, and snippets.

View t04glovern's full-sized avatar
🎯
Watching Speed-runs while i code

Nathan Glover t04glovern

🎯
Watching Speed-runs while i code
View GitHub Profile
@t04glovern
t04glovern / lets-try-iceberg.py
Last active September 15, 2025 09:23
Creates a sample Iceberg table in Athena allowing you to try out Iceberg easily. This script is geared towards people who are new to the AWS variety of Iceberg and keen to try some of the unique features of Iceberg.
#!/usr/bin/env python3
"""
This script generates sample data, uploads it to an S3 bucket, and creates Iceberg and Athena tables.
It also creates IAM roles and policies for optimization and statistics generation if specified.
There is also an option to create a Firehose delivery stream and insert random records into it.
Install:
python3 -m venv .venv
source .venv/bin/activate
@t04glovern
t04glovern / partition-projection-synthetic-data.py
Last active September 25, 2023 07:03
Amazon Athena Partition Projection synthetic data generator
#!/usr/bin/env python
#
# pip install boto3
# ./partition-projection-synthetic-data.py --bucket <bucket-name>
#
# Creates the following files:
# - partition-projection-create-table.sql - CREATE TABLE statement
# - partition-projection-query-table.sql - SQL to query the table
import logging
@t04glovern
t04glovern / .bash_profile
Created May 14, 2023 05:35
Generates PR comments - prefixes with JIRA ticket numbers provided you are using branch names provided by JIRA
alias pr_comment='~/.pr-comment.sh'
#!/usr/bin/env python3
# This script will check for any StackSets that are not in the manifest.yaml file.
# https://github.com/aws-solutions/aws-control-tower-customizations/releases/tag/v2.5.0
import boto3
import yaml
import logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
import os
import openai
import json
import frontmatter
import time
import requests
# pip install python-frontmatter requests openai
openai.api_key = os.getenv("OPENAI_API_KEY")
@t04glovern
t04glovern / github-action-bot.yml
Last active October 20, 2022 03:06
GitHub Bot User - Comment/Update Comment on PR
name: Workflow
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
ci:
@t04glovern
t04glovern / github-action-example.yml
Last active August 4, 2023 14:03
Run thumbprint.sh to deploy the provider.yml file into each of your managed AWS accounts. This creates an OIDC Provider that a template like the oidc-role-example.yml can use to create a role. This role can then be assume by your GitHub action
name: OIDC Example action
on:
workflow_dispatch:
push:
branches:
- main
jobs:
example:
@t04glovern
t04glovern / amazon-workmail-export.yml
Last active June 8, 2022 15:14
Roles and Resources required to export Amazon WorkMail content programmatically
AWSTemplateFormatVersion: 2010-09-09
Description: Roles and Resources required to export Amazon WorkMail content programmatically
Resources:
WorkMailExportBucket:
Type: AWS::S3::Bucket
WorkMailExportBucketKey:
Type: AWS::KMS::Key
DeletionPolicy: Retain
@t04glovern
t04glovern / greengrassv2-deploy.yml
Created May 3, 2022 02:41
Github Action Deploy AWS Greengrass v2
name: Component deploy
on:
repository_dispatch:
push:
branches:
- main
jobs:
@t04glovern
t04glovern / build.sh
Created May 1, 2022 16:37
AWS Greengrass Development Kit Example
python3 -m pip install -U git+https://github.com/aws-greengrass/[email protected]
gdk component build
gdk component publish