Skip to content

Instantly share code, notes, and snippets.

View nquayson's full-sized avatar

Nana nquayson

View GitHub Profile
import os
import boto3
client = boto3.client('dynamodb')
table = os.environ["TABLE_NAME"]
def update_hit():
response = client.update_item(
TableName=table,
Key={'id': {'S': "1"}},
@nquayson
nquayson / README.md
Created May 2, 2023 19:56 — forked from reegnz/README.md
Using terraform for_each and toset instead of count

Using terraform for_each and toset instead of count

Using terraform count and the pain of working with it

If you're using terraform extensively you probably ran into an issue like this.

This is a synthetic example but I still hope the problem is recognizable as something that also happens out in the wild.

First, you have a list variable (in terraform.tfvars)

@nquayson
nquayson / amazon.md
Created February 15, 2022 18:24 — forked from terabyte/amazon.md
Amazon's Build System

Prologue

I wrote this answer on stackexchange, here: https://stackoverflow.com/posts/12597919/

It was wrongly deleted for containing "proprietary information" years later. I think that's bullshit so I am posting it here. Come at me.

The Question

Amazon is a SOA system with 100s of services (or so says Amazon Chief Technology Officer Werner Vogels). How do they handle build and release?