Skip to content

Instantly share code, notes, and snippets.

View p0bailey's full-sized avatar
😃
"A smooth sea never made a skilled sailor."

Phillip Bailey p0bailey

😃
"A smooth sea never made a skilled sailor."
View GitHub Profile
@p0bailey
p0bailey / Amazon-SQS-FAQs.md
Last active August 9, 2018 11:35
Amazon SQS FAQs

Amazon SQS FAQs

Overview

Q: What are the benefits of Amazon SQS over homegrown or packaged message queuing systems?

Amazon SQS provides several advantages over building your own software for managing message queues or using commercial or open-source message queuing systems that require significant up-front time for development and configuration.

These alternatives require ongoing hardware maintenance and system administration resources. The complexity of configuring and managing these systems is compounded by the need for redundant storage of messages that ensures messages are not lost if hardware fails.

@p0bailey
p0bailey / aws-vault-demo-s3.tf
Created October 29, 2017 21:44
s3 aws-vault demo
resource "aws_s3_bucket" "bucket" {
bucket = "somethingVaultTest"
acl = "private"
tags {
Name = "vault-demo"
Environment = "Demo"
}
}
@p0bailey
p0bailey / mfa_ip_lockdown.tf
Created October 27, 2017 15:51
terraform iam group aws api mfa protected plus ip lockdown
resource "aws_iam_group" "ec2Admins" {
name = "ec2Admins"
}
resource "aws_iam_group_policy" "force_MFA_on_apikeys_policy" {
name = "force_MFA_on_apikeys_policy"
group = "${aws_iam_group.ec2Admins.id}"
depends_on = ["aws_iam_group.ec2Admins"]
policy = <<EOF
@p0bailey
p0bailey / mfa.tf
Last active October 27, 2017 15:49
terraform iam group aws api mfa protected
resource "aws_iam_group" "ec2Admins" {
name = "ec2Admins"
}
resource "aws_iam_group_policy" "force_MFA_on_apikeys_policy" {
name = "force_MFA_on_apikeys_policy"
group = "${aws_iam_group.ec2Admins.id}"
depends_on = ["aws_iam_group.ec2Admins"]
policy = <<EOF
{
    "body": {
        "key": {
            "eldest_kid": "0120b09faec5a707c96c64c74fd2531cd384e00490422fb6e7fc5249adf8ff1228eb0a",
            "host": "keybase.io",
            "kid": "0120b09faec5a707c96c64c74fd2531cd384e00490422fb6e7fc5249adf8ff1228eb0a",
            "uid": "5f7e6bea1f97ceb2f1d0916f9054d119",
            "username": "pbailey"
        },
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :hosts do |provisioner|
provisioner.autoconfigure = true
@p0bailey
p0bailey / MalformedPolicyDocument: Invalid principal in policy: "AWS"
Created June 8, 2016 13:43
MalformedPolicyDocument: Invalid principal in policy: "AWS"
terraform apply -var-file=../../aws.tfvars
aws_iam_role.SecurityMonkeyInstanceProfile: Creating...
arn: "" => "<computed>"
assume_role_policy: "" => "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Principal\": {\n \"Service\": \"ec2.amazonaws.com\"\n },\n \"Action\": \"sts:AssumeRole\"\n }\n ]\n }"
name: "" => "SecurityMonkeyInstanceProfile"
path: "" => "/"
unique_id: "" => "<computed>"
aws_iam_role.SecurityMonkeyInstanceProfile: Creation complete
aws_iam_role.SecurityMonkey: Creating...
arn: "" => "<computed>"
@p0bailey
p0bailey / .gitignore
Last active August 29, 2015 14:11
GitIgnore
env/
venv/
*.pyc
db.sqlite3