Skip to content

Instantly share code, notes, and snippets.

View mistwire's full-sized avatar

Chris Williams mistwire

View GitHub Profile
@mistwire
mistwire / reinvent-2017-youtube.md
Created December 11, 2017 15:40 — forked from stevenringo/reinvent-2017-youtube.md
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@mistwire
mistwire / EC2-Stopped-Tagged-Lambda.py
Created March 21, 2019 17:05 — forked from mlapida/EC2-Stopped-Tagged-Lambda.py
Using a lambda function, stop all instances that are tagged appropriately.
import boto3
import logging
#setup simple logging for INFO
logger = logging.getLogger()
logger.setLevel(logging.INFO)
#define the connection
ec2 = boto3.resource('ec2')
@mistwire
mistwire / ssh_key.tf
Created March 26, 2024 15:44 — forked from irvingpop/ssh_key.tf
Terraform external data source example - dynamic SSH key generation
# ssh key generator data source expects the below 3 inputs, and produces 3 outputs for use:
# "${data.external.ssh_key_generator.result.public_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key}" (contents)
# "${data.external.ssh_key_generator.result.private_key_file}" (path)
data "external" "ssh_key_generator" {
program = ["bash", "${path.root}/../ssh_key_generator.sh"]
query = {
customer_name = "${var.customer_name}"
customer_group = "${var.customer_group}"