Skip to content

Instantly share code, notes, and snippets.

@allenheltondev
allenheltondev / test.json
Last active July 22, 2020 11:53
Load Test Rule Set
{
"execution": [
{
"executor": "newman",
"iterations": 5000,
"scenario": "simple"
}
],
"scenarios": {
"simple": {
@allenheltondev
allenheltondev / Dockerfile
Created July 22, 2020 11:57
Updated Dockerfile for Load Testing with Postman
FROM blazemeter/taurus
# taurus includes python and pip
RUN pip install --no-cache-dir awscli
# Taurus working directory = /bzt-configs
ADD ./load-test.sh /bzt-configs/
# Added json files for Postman support
ADD Collection.json .
ADD test.json .
{
"id": "80ff6024-13ee-4ca1-be85-179d6f65ba5d",
"name": "Breaking Change Detector",
"values": [
{
"key": "env-apiKey",
"value": "",
"enabled": true
},
{
@allenheltondev
allenheltondev / consumeMacroCfn.yaml
Last active January 25, 2021 13:50
CloudFormation Macro Example
AWSTemplateFormatVersion: '2010-09-09'
Transform: [AWS::Serverless-2016-10-31, AddSSMParametersMacro]
Description: SAM template for consuming a CloudFormation Macro
Resources:
ExampleWithEnvVarFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: example-with-env-var
Handler: function.handler
@allenheltondev
allenheltondev / ExampleCidrConfiguration.yaml
Created March 2, 2021 12:57
Example IP ranges you can use for configuring a Lambda function with a static IP
Parameters:
VpcCidrBlock:
Type: String
Default: "12.0.0.0/16"
PublicSubnetCidrBlock:
Type: String
Default: "12.0.0.0/24"
PrivateSubnetCidrBlock:
Type: String
Default: "12.0.1.0/24"
@allenheltondev
allenheltondev / README.md
Last active March 24, 2021 11:53
Example README with Infrastructure Diagram

My Example Microservice

Description

This is an example README for Gopher Holes Unlimited - a fake business but real API that tracks two things:

  1. Gophers
  2. Holes

Infrastructure

Infrastructure Diagram

@allenheltondev
allenheltondev / template.yaml
Created February 25, 2022 13:07
Adding a Global Layer To Your SAM Template
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Runtime: nodejs14.x
Architectures:
- arm64
Tracing: Active
Timeout: 3
Handler: index.handler
@allenheltondev
allenheltondev / index.js
Created September 21, 2022 12:44
Parameterize Step Function Workflow Definition
const fs = require('fs');
const YAML = require('json-to-pretty-yaml');
const definition = JSON.parse(fs.readFileSync('definition.asl.json'));
const substitutions = [];
parameterizeStates(definition.States, substitutions);
console.log(substitutions)
@allenheltondev
allenheltondev / services.json
Created October 4, 2022 16:50
API Gateway Direct Integrations
[
"Amazon MQ",
"AppStream 2.0",
"AppSync",
"AppSync Data Plane",
"Athena",
"Auto Scaling",
"AWS Certificate Manager (ACM)",
"Batch",
"Cloud Directory",
@allenheltondev
allenheltondev / openapi.yaml
Created October 5, 2022 12:25
Integrating API Gateway to Amazon Translate
openapi: 3.0.0
info:
title: AWS Service Integration API
version: 1.0.0
paths:
/translations:
post:
requestBody:
required: true