Skip to content

Instantly share code, notes, and snippets.

View scott-edwards-123's full-sized avatar

Scott Edwards scott-edwards-123

View GitHub Profile
@JerimyTate
JerimyTate / aws-certification.md
Created May 7, 2017 16:03 — forked from miglen/aws-certification.md
AWS Certification guide and notes on how to prepare for the aws associate certification architect, sysops and developer exams


AWS Certification notes

Those are my personal notes on AWS Solution Architect certification preparation. Hope you find them usefull.

To pass AWS certification, you should have:

  • Sound knowledge about most of the AWS services ( EC2, VPC, RDS, Cloudfront, S3, Route53 etc,)
  • Hands on experience with AWS services.
@leonardofed
leonardofed / README.md
Last active November 14, 2024 13:37
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Using aws-cli and jq

list all instances for all ASGs

aws autoscaling describe-auto-scaling-instances \
  | jq '.AutoScalingInstances[] | {AutoScalingGroupName, InstanceId}'

list instance IDs for a particular ASG

@james-huston
james-huston / hastats.sh
Last active February 7, 2018 13:21
HAProxy stats to StackDriver using a shell script
# run this every minute from cron as a quick and dirty solution to get some
# haproxy stats on each of your listeners over to stackdriver
instance=$(curl -s "http://169.254.169.254/latest/meta-data/instance-id")
# while [ 1 ]; do
cp /dev/null /tmp/hastats.json
echo 'show stat' | socat - UNIX-CLIENT:/tmp/haproxy.sock \
|while IFS=',' read pxname svname qcur qmax scur smax slim stot bin bout dreq \
dresp ereq econ eresp wretr wredis status weight act bck chkfail chdown lastchg \
@lalyos
lalyos / ambari.md
Last active November 30, 2017 03:44
ambari setup

Ambari uses a local postgres db by default.This page describes how to use ambari-server with remote postgres server.

Install

Ambari is installed on centos 6.4 with the following command:

curl -so /etc/yum.repos.d/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos6/1.x/GA/ambari.repo
yum repolist
yum -y install ambari-server
@bridgetkromhout
bridgetkromhout / AWS ELB pre-warming questions
Created January 23, 2014 16:25
AWS ELB pre-warming questions. These questions (and sample answers) were provided by AWS support on 2013-11-26; I've edited slightly for clarity.
0. What is the name of the ELB which needs to be pre-warmed?
a. e.g. yourwebapp-yourcompany-123456789.us-east-1.elb.amazonaws.com
1. What is the approximate increase percentage in traffic, or expected requests/sec that will go through the load balancer (whichever is easier to answer)?
a. e.g. 3,500 per second
2. Do you know the average amount of data passing through the ELB per request/response pair?
a. e.g. Roughly 250KB.
3. Expected percent of traffic going through the ELB that will be using SSL termination?
@mrinaudo
mrinaudo / LICENSE
Last active October 27, 2021 18:37
Basic Template Builder for AWS VPC - Interactively generate basic AWS CloudFormation-based AWS VPC templates.
The MIT License (MIT)
Copyright (c) 2014 Matteo Rinaudo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@aegrumet
aegrumet / gist:6374367
Last active December 21, 2015 22:19
AWS command-line jq commands
# ec2 instance info
aws ec2 describe-instances | sed -e 's/"Key"/"key"/' -e 's/"Value"/"value"/' |jq -c '[.Reservations[].Instances[]|{PrivateIpAddress,PublicIpAddress, AZ: .Placement.AvailabilityZone, Name: (.Tags|from_entries|.Name)}]|sort_by(.Name)[]'
# ec2 instance info with filter
aws --profile us ec2 describe-instances --filters '[{"Name":"tag-key","Values":["Name"]}, {"Name":"tag-value","Values":["*agentserver*"]}]' | sed -e 's/"Key"/"key"/' -e 's/"Value"/"value"/' |jq -c '[.Reservations[].Instances[]|{PrivateIpAddress,PublicIpAddress, AZ: .Placement.AvailabilityZone, Name: (.Tags|from_entries|.Name)}]|sort_by(.Name)[]'
# ebs snapshot info
@emilisto
emilisto / ec2_tags.py
Last active March 15, 2019 17:07
Grain for Salt that exposes all EC2 instance tags in grains['tags'], free for all to use and distribute. Tweet me @svammel if you have questions.
"""
ec2_tags - Exports all EC2 tags in a 'tags' grain
For Salt (http://saltstack.org)
Author: Emil Stenqvist <[email protected]>
Usage:
1. Put ec2_tags.py in roots/_grains/
@howeyc
howeyc / s3cp.go
Last active January 21, 2021 20:07
Golang - copy files to / from s3
// From https://github.com/kr/s3/tree/master/s3cp
// Added public read for uploaded files
// Command s3cp copies a file to or from Amazon S3.
//
// Usage:
//
// s3cp file url
// s3cp url file
//
// The file does not need to be seekable or stat-able. You can use s3cp to