Skip to content

Instantly share code, notes, and snippets.

View mbonig's full-sized avatar

Matthew Bonig mbonig

View GitHub Profile
@mbonig
mbonig / LogicalIdMapper.ts
Created October 10, 2022 01:35
An AWS CDK LogicalId remapper aspect
import { CfnElement, CfnResource, IAspect, Stack } from 'aws-cdk-lib';
import { IConstruct } from 'constructs';
export interface IdMap {
[key: string]: string;
}
export class LogicalIdMapper implements IAspect {
constructor(private idMap: IdMap) {
}
@mbonig
mbonig / gist:76cb27ad15e9e9b5c4515231d643e830
Created February 21, 2020 21:22
Simple method for loading csvs into dynamodb
exports.handler = async(event) => {
console.log(JSON.stringify(event.Records));
if (event.Records) {
for (const record of event.Records) {
await process(record.s3);
}
}
};
@mbonig
mbonig / Move AWS History
Last active December 27, 2018 16:01
Tampermonkey Script - I never used AWS's nav shortcuts and the Resource Groups was never that useful to me, so I've removed those in favor of moving the Service History column from the Services dropdown to the navbar instead, since that was always more useful to me.
// ==UserScript==
// @name AWS Console - Move History to Main Nav Bar
// @namespace http://fourlittledogs.com/
// @version 0.1
// @description This script moves the Service History, normally accessible through a dropdown, to the main nav bar.
// @author @mattbonig
// @match https://console.aws.amazon.com/*
// @grant GM_addStyle
// @require http://code.jquery.com/jquery-3.3.1.min.js
// ==/UserScript==