Skip to content

Instantly share code, notes, and snippets.

View anuragmathur1's full-sized avatar

Anurag Mathur anuragmathur1

  • Sydney, AU
View GitHub Profile
@anuragmathur1
anuragmathur1 / cloudwatch-sample-scripts.sh
Last active May 3, 2017 20:48
Userdata script to bootstrap EC2 with cloudwatch sample scripts from AWS
#!/bin/bash
## Reference web Page : http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html
yum install perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https -y
curl http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip -O
unzip CloudWatchMonitoringScripts-1.2.1.zip
rm CloudWatchMonitoringScripts-1.2.1.zip
@anuragmathur1
anuragmathur1 / awspycli-linux.txt
Created April 4, 2017 22:04
AWS - bash script for EC2 userdata to bootstrap with python and AWS CLI
#!/bin/bash
yum install perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https -y
curl http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip -O
unzip CloudWatchMonitoringScripts-1.2.1.zip
rm CloudWatchMonitoringScripts-1.2.1.zip
@anuragmathur1
anuragmathur1 / awspycli-win.txt
Last active April 4, 2017 22:04
AWS - Powershell Userdata script t bootstrap EC2 with python and AWS CLI
<powershell>
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
choco install python -y
(new-object net.webclient).DownloadFile('https://s3.amazonaws.com/aws-cli/AWSCLI64.msi','c:\AWSCLI64.msi')
msiexec.exe /i 'C:\AWSCLI64.msi' /qn
</powershell>