Author:
erics , July 1st, 2019
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
DATE = ` date `
(
echo "From: Your Full Name <you@yourdomain.com>"
echo "To: you@yourdomain.com"
echo "Subject: AWS Instances Report for All Customers as of $DATE"
cat << EOT
MIME - Version : 1.0
Content - Type : text / html
Content - Disposition : inline
< html >
< body >
< pre style = "font: monospace" >
EOT
for profile in customer1 customer2 customer3 ; do
for region in ` aws ec2 describe - regions -- output text | cut - f3 ` ; do
echo - e "\nListing Instances for profile $profile in region: '$region'..."
aws ec2 describe - instances \
-- filters "Name=instance-state-name,Values=running" \
-- query 'Reservations[*].Instances[*].[InstanceId, PublicIpAddress, LaunchTime, InstanceType, Tags[?Key==`Name`] | [0].Value]| sort_by(@, &@[0][2])' \
-- region $region \
-- profile $profile \
-- output table
done
done
cat << EOT
< / pre >
< / body >
< / html >
EOT
) | / usr / sbin / sendmail - t
Categories: How-To's , Technology Tags: AWS , aws ec2 , Date , EC2 , Email , Font , Format , howto , html , LaunchTime , mail , monospace , monospaced , Multiple , Region , Regions , SendMail , sort , Sort By , time , tips
| No comments
Author:
erics , February 9th, 2016
I was getting the following errors when using an older version of the Amazon EC2 API Tools: $ ec2-describe-regions Unknown problem connecting to host: ‘https://ec2.amazonaws.com’ Unable to execute HTTP request: peer not authenticated The solution was to upgrade to the latest AWS CLI tools and start using the aws command instead. For example: aws ec2 […]
Categories: How-To's , Technology Tags: Amazon , API , API Tools , apitools , AWS , awscli , cli , EC2 , http , https , Peer , Peer Not Authenticated , Request , Unknown problem
| No comments
Author:
erics , August 15th, 2013
yum install python
python / usr / bin / easy_install pip
pip install boto
Categories: How-To's , Technology Tags: Amazon , AWS , Boto , EC2 , howto , Install , Linux , pip , Python , S3 , tips , Yum
| No comments
Author:
erics , March 28th, 2013
https://help.ubuntu.com/community/EC2APITools https://help.ubuntu.com/community/Repositories/CommandLine#Adding_the_Universe_and_Multiverse_Repositories As root in /root: vim /etc/apt/sources.list ## Added to the bottom: deb http://us.archive.ubuntu.com/ubuntu/ hardy multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ hardy multiverse deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse apt-get update apt-get install sun-java5-jre apt-get install unzip wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-34128.zip unzip ec2-api-tools-1.3-34128.zip export EC2_HOME=/root/ec2-api-tools-1.3-34128 export PATH=$PATH:$EC2_HOME/bin mkdir .pem Copy downloaded X.509 private key and cert into […]
Categories: How-To's , Technology Tags: AWS , cert , EC2 , Export , Hardy , Java , Multiverse , private key , RDS , Ubuntu
| No comments
Author:
erics , December 30th, 2011
yum -- enablerepo = epel install perl - Net - Amazon - EC2 perl - File - Slurp perl - DBI perl - DBD - MySQL perl - Net - SSLeay perl - IO - Socket - SSL perl - Time - HiRes perl - Params - Validate ca - certificates
wget - O / opt / aws / bin / ec2 - consistent - snapshot http : //bazaar.launchpad.net/~alestic/ec2-consistent-snapshot/trunk/download/head:/ec2consistentsnapsho-20090928015038-9m9x0fc4yoy54g4j-1/ec2-consistent-snapshot
chmod 0775 / opt / aws / bin / ec2 - consistent - snapshot
http://alestic.com/2009/09/ec2-consistent-snapshot http://www.thatsgeeky.com/2011/05/ec2-consistent-snapshot-on-amazons-linux-ami/ http://www.thatsgeeky.com/2011/06/rotating-ebs-snapshots-ec2-prune-snapshots/
Categories: How-To's , Technology Tags: Amazon , Amazon Linux , AWS , CentOS , chmod , consistent-snapshot , EC2 , ec2-consistent-snapshot , EPEL , howto , Linux , perl , Repo , Snapshot , tips , wget , Yum
| No comments
Author:
erics , November 8th, 2011
My second article has just been published on CloudSpring.com! This is very exciting for me, and there are going to be more on the way.
Categories: Technology , Wyzaerd Tags: Amazon , backup , CloudSpring , cloudspring.com , DR , EC2 , Instance , Recovery , Restore , sitepoint.com
| No comments
Author:
erics , October 26th, 2011
UPDATE on 3/30/2022 – Source code patched to support new AWS Linux 5.10 kernel. (Amazon Linux 2) http://www.wyzaerd.com/public/rpc.rstatd-5.10.tar.gz UPDATE on 8/16/2016 – Source code patched to support new AWS Linux 4.9 kernel. http://www.wyzaerd.com/public/rpc.rstatd-4.0.4.tar.gz UPDATE on 7/12/2016 – Source code patched to support new AWS Linux 4.4 kernel. http://www.wyzaerd.com/public/rpc.rstatd-4.0.4.tar.gz UPDATE on 11/9/2015 – Source code patched […]
Categories: How-To's , Technology Tags: AWS , CentOS , EC2 , howto , portmapper , rpc.rstatd , rpcbind , rpcinfo , rstatd , rup , statd , tips
| 3 comments
Author:
erics , August 16th, 2011
Be sure to create regular snapshots of your running instances. If you lose an instance, recover quickly with this procedure. I suggest that you use Elastic IP addresses to make the migration DNS-free. STEP 1: First, setup your environment properly
export EC2_HOME = '/opt/aws/apitools/ec2' # Make sure you use the API tools, not the AMI tools
export EC2_BIN = $ EC2_HOME / bin
export EC2_PRIVATE_KEY = / path / to / keys / pk - { Your Private Key ID Here } . pem
export EC2_CERT = / path / to / keys / cert - { Your Private Key ID Here } . pem
export PATH = $ PATH : $ EC2_BIN
export JAVA_HOME = / usr / java / latest
STEP 2: Create an AMI linked to the snapshot % ec2-register -n YOUR-AMI-NAME -d […]
Categories: How-To's , Technology Tags: Amazon , AMI , AWS , Clone , Cloud , EC2 , ec2-register , ec2run , Elastic , Elastic IP , howto , Instance , Register , Snapshot , tips
| No comments
Author:
erics , January 8th, 2011
UPDATE: # yum install ec2-utils # rpm -ql ec2-utils /etc/udev/rules.d/51-ec2-hvm-devices.rules /opt/aws/bin/ec2-metadata /sbin/ec2udev # ec2-metadata -i | awk ‘{print $2}’ Just wrote a script for BudgetTravel.com and needed to determine the Instance ID. Here is how: $ wget http://s3.amazonaws.com/ec2metadata/ec2-metadata $ chmod u+x ec2-metadata $ ./ec2-metadata -i # ec2-metadata -i | awk ‘{print $2}’ > /etc/instanceid Link […]
Categories: How-To's , Technology Tags: AWS , EC2 , ec2-metadata , Instance ID , instanceid , metadata
| No comments