Skip to content

Instantly share code, notes, and snippets.

@christopherhein
christopherhein / cr.yaml
Last active July 13, 2019 17:35
Example CRs for AWS Service Operator
$ kubectl get aws
NAME STATUS CREATED AT
apigatewaygatewayresponse.awsctrl.io/example-apigateway-gatewayresponse 11m
NAME STATUS CREATED AT
ec2eip.awsctrl.io/example-ec2-eip 11m
NAME STATUS CREATED AT
ec2vpccidrblock.awsctrl.io/example-ec2-vpccidrblock 11m
NAME STATUS CREATED AT
guarddutythreatintelset.awsctrl.io/example-guardduty-threatintelset 11m
NAME STATUS CREATED AT
@surajssd
surajssd / Vagrantfile
Last active July 26, 2020 04:39
kubernetes the hard way
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "master" do |master|
master.vm.box = "fedora/28-cloud-base"
master.vm.hostname = "master"
master.vm.network "private_network", ip: "192.168.50.10"
end
@pilgrim2go
pilgrim2go / aws-athena-auto-partition-lambda.py
Created September 20, 2018 08:48 — forked from SQLadmin/aws-athena-auto-partition-lambda.py
AWS Athena create auto partition for CloudTrail logs on Daily Basis
# Lambda function to create partition for Cloudtrail log on daily basis.
# You need to schedule it in AWS Lambda.
'''
-------------------------------------------
AWS Athena Create Partitions Automatically
-------------------------------------------
Version 1.0
Author: SqlAdmin
@daniel-woods
daniel-woods / sns_lambda_teams_webhook.py
Last active September 29, 2018 02:40
Use a Webhook to send a message to a Microsoft Teams channel using Connectors/Incoming Webhook
#!/usr/bin/python3
# https://gist.github.com/daniel-woods
# Use a Webhook to send a message to a Microsoft Teams channel using Connectors/Incoming Webhook
import json
from urllib2 import urlopen, HTTPError, Request
def post_message(url, data):
req = Request(url, data)
@StevenACoffman
StevenACoffman / notify_slack.py
Created September 11, 2018 14:06 — forked from richardnbanks/notify_slack.py
AWS Lambda function to send notifications from CodeDeploy to Slack
from __future__ import print_function
import json, urllib, urllib2
def send_slack(message):
"""
Send Slack Message to Deployments Channel
"""
slack_token = ''
slack_channel = ''
slack_user = 'Deployment Bot'

I'll be doing a Kubernetes Intro to Advanced workshop on Feb 20th 9am to 5pm and Feb 25th 9am to 5pm.

Here is a rough syllabus for the workshop (subject to change):

Overview (How we got here): [20 min]

  • Story of a web dude (how a monolith service is managed)
  • Move from monolith to microservices
  • How is the infrastructure moving with this trend (baremetal -> VM -> containers -> serverless)
  • Where everything is at on the technology curve
@0xdabbad00
0xdabbad00 / aws actions
Created August 3, 2018 17:10
AWS API calls as extracted from boto using the technique on https://github.com/duo-labs/cloudtracker#aws_actionstxt
a4b:AssociateContactWithAddressBook
a4b:AssociateDeviceWithRoom
a4b:AssociateSkillGroupWithRoom
a4b:CreateAddressBook
a4b:CreateContact
a4b:CreateProfile
a4b:CreateRoom
a4b:CreateSkillGroup
a4b:CreateUser
a4b:DeleteAddressBook
@0xdabbad00
0xdabbad00 / privileges.txt
Last active April 20, 2021 18:28
AWS IAM privileges as found using the AWS Policy Generator described at https://summitroute.com/blog/2018/06/28/aws_iam_vs_api_vs_cloudtrail/
a4b:AssociateDeviceWithRoom
a4b:AssociateSkillGroupWithRoom
a4b:CreateProfile
a4b:CreateRoom
a4b:CreateSkillGroup
a4b:CreateUser
a4b:DeleteProfile
a4b:DeleteRoom
a4b:DeleteRoomSkillParameter
a4b:DeleteSkillGroup
@daniel-woods
daniel-woods / gist:bda445616d59e4f8b98e93735a298b79
Last active September 29, 2018 02:40
sns_SubscribeAddFilterPolicy.py
#!/usr/bin/env python
import boto3
import json
sns = boto3.client("sns")
topic_arn = "YOUR_SNS_TOPIC"
proto = "http"
endpoint = "YOUR_EDNPOINT"
attributes = {"FilterPolicy": json.dumps({"key": ["foo", "bar"]})}
Description: "\nCloudSpy CloudFormation Template: This installs the role and profile\
\ needed for CloudSpy to manage your backups\n"
Parameters:
CloudSpyTemplateId:
Description: ID assigned by cloudspy for this template
Type: String
ExternalId:
Description: Used to verify STS AssumeRole
Type: String
Resources: