Skip to content

Instantly share code, notes, and snippets.

Avatar

rowan rowanu

View GitHub Profile
@rowanu
rowanu / output.log
Created Feb 10, 2018
CodeBuild Output
View output.log
[Container] 2018/02/10 08:28:22 Waiting for agent ping
[Container] 2018/02/10 08:28:25 Waiting for DOWNLOAD_SOURCE
[Container] 2018/02/10 08:28:31 Phase is DOWNLOAD_SOURCE
[Container] 2018/02/10 08:28:31 CODEBUILD_SRC_DIR=/codebuild/output/src210388559/src
[Container] 2018/02/10 08:28:31 YAML location is /codebuild/output/src210388559/src/buildspec.yaml
[Container] 2018/02/10 08:28:31 Processing environment variables
[Container] 2018/02/10 08:28:31 Moving to directory /codebuild/output/src210388559/src
[Container] 2018/02/10 08:28:31 Registering with agent
[Container] 2018/02/10 08:28:31 Phases found in YAML: 3
[Container] 2018/02/10 08:28:31 INSTALL: 3 commands
@rowanu
rowanu / updateSecurityGroup.js
Last active Dec 25, 2019
Update an AWS Security Group to allow access by a specific AWS service.
View updateSecurityGroup.js
'use strict';
const AWS = require('aws-sdk');
const https = require('https');
const ec2 = new AWS.EC2();
const ipRangesUrl = 'https://ip-ranges.amazonaws.com/ip-ranges.json';
const target = {
port: 5432,
protocol: 'tcp',
@rowanu
rowanu / function-and-log-group.yaml
Last active Mar 19, 2021
Clean up a Lambda function's logs when you delete it
View function-and-log-group.yaml
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
MyFunction:
Type: AWS::Serverless::Function
Properties:
InlineCode: |
exports.handler = async () => {
@rowanu
rowanu / data.json
Last active Jul 25, 2021
Visualising EC2 Security Groups
View data.json
[
{
"name": "AppName-AppServer-ASG-SG",
"id": "sg-b8ce4cc0",
"ingress": [
{
"name": "AppName-AppServer-ELB-SG",
"protocol": "tcp",
"fromPort": 8080
}
@rowanu
rowanu / README.md
Last active Jul 30, 2021
Hotness Widget for the Dashing dashboard from Shopify
View README.md

Dashing Hotness Widget

Are you dashing? Are you hot? Then you need the Dashing Hotness Widget!

See the blog post for more details.

About

This widget is similar to the basic Number widget, except that the entire widget changes colour based on the value displayed. It is designed to draw attention to

@rowanu
rowanu / codebuild.yaml
Created Jan 13, 2020
Invalidate CloudFront from CodePipeline
View codebuild.yaml
InvalidateCacheProject:
Type: AWS::CodeBuild::Project
Properties:
Artifacts:
Type: CODEPIPELINE
Environment:
ComputeType: BUILD_GENERAL1_SMALL
Image: aws/codebuild/standard:2.0
Type: LINUX_CONTAINER
Name: !Sub ${AWS::StackName}-invalidate-cache