Skip to content

Instantly share code, notes, and snippets.

View nathanmalishev's full-sized avatar
🦹‍♂️

Nathan Malishev nathanmalishev

🦹‍♂️
View GitHub Profile

Keybase proof

I hereby claim:

  • I am nathanmalishev on github.
  • I am nathanmalishev (https://keybase.io/nathanmalishev) on keybase.
  • I have a public key ASCji8EUH8o6tx2L4aRO0Wb0vJnGfBfEA-1A0c9WqA-qBQo

To claim this, I am signing this object:

@nathanmalishev
nathanmalishev / aws_alb_grok_pattern
Last active April 8, 2021 02:52
AWS ALB Classifier
^%{DATA:http} %{TIMESTAMP_ISO8601:timestamp} %{DATA:gateway} %{URIHOST:client} %{URIHOST:target} %{NUMBER:request_processing_time} %{NUMBER:target_processing_time} %{NUMBER:response_processing_time} %{WORD:elb_status_code} %{WORD:target_status_code} %{NUMBER:received_bytes} %{NUMBER:sent_bytes} "%{REQUEST:target_request}" "%{DATA:user_agent}" %{DATA:ssl_cipher} %{DATA:ssl_protocol} %{DATA:target_group_arn} "%{DATA:trace_id}" "%{DATA:domain_name}" "%{DATA:chosen_cert_arn}" %{NUMBER:matched_rule_priority}$
:map 2 :call VimuxPromptCommand("echo 'command'")<CR><CR>
# This template is a Cloud Formation template, that has AWS Sam seamlessly mixed in
# It is extremely powerful as you will see!
# This is a template of Lambda & RDS, publically available (so no private VPC)
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31 # This is to tell cloudformation we need to transform this template, as it has SAM!
Description: Severless set up with an RDS
######## ### ######## ### ## ##
## ## ## ## ## ## ## ## ### ###
@nathanmalishev
nathanmalishev / createAndExecuteRoles.yaml
Last active January 25, 2019 17:19
A set of policies, used to create an initial ci user
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- 'cloudformation:CreateChangeSet'
- 'cloudformation:DescribeChangeSet'
- 'cloudformation:ExecuteChangeSet'
- 'cloudformation:DescribeStacks'
Resource:
- 'arn:aws:cloudformation:<region>:<account_no>:stack/<roles_permission_stack_name>/*'
Parameters:
Env:
Description: An environment name that will be prefixed to resource names
Type: String
AllowedValues: ["development", "production"]
resources:
NetworkRole:
Type: "AWS::IAM::Role"
Properties:
@nathanmalishev
nathanmalishev / network-deploy-snippey.yaml
Last active July 18, 2018 00:32
A snippet of the roles-stack for medium
WebAppRole:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Action:
- "sts:AssumeRole"
Principal:
+-------------+------------+--------------+-------------+
| Service | Speed | Environment | Extra hacks |
+-------------+------------+--------------+-------------+
| Serverless | 💩 | 🔥 | 🔥 |
| AWS SAM | 👍 | 👍 | 💩 |
| Local | 🔥 | 💩 | 💩 |
+-------------+------------+--------------+-------------+
Shit hot (very good) - 🔥
Okay - 👍
Shit - 💩
@nathanmalishev
nathanmalishev / makefile
Last active March 1, 2020 06:25
makefile, for use with AWS Lambda & golang, showing local development
clean:
@rm -rf dist
@mkdir -p dist
gomon:
reflex -r '\.go' -s -- sh -c 'make build'
build: clean
@for dir in `ls handler`; do \
GOOS=linux go build -o dist/handler/$$dir PATH/handler/$$dir; \
@nathanmalishev
nathanmalishev / modd.conf
Last active March 1, 2020 06:25
Modd conf showing individual handler rebuilds and global rebuils for utils
handler/handlerX/**.go {
prep: go build -o dist/handlerX ./handler/handlerX/
}
handler/handlerY/**.go {
prep: go build -o dist/handlerY ./handler/handlerY/
}
helper/**.go util/**.go {
prep: for dir in `ls handler`; do \