Which AWS Services you want to learn about?
June 29, 2015 Leave a comment
Cloud, BigData, Node.js
December 18, 2013 3 Comments
One of the most common problems that lot of people (who are learning AWS) face is that they can’t figure out which service in AWS they forgot to turn off. This shows up in month end on their credit card bills.
I have started with a long term project to use boto (python SDK for AWS) to list & take action on all of your components in AWS in all the regions. As first part of the series, here is the python code that can be used to list all EC2 Instances & EBS volumes.
import argparse | |
import boto.ec2 | |
access_key = '' | |
secret_key = '' | |
def get_ec2_instances(region): | |
ec2_conn = boto.ec2.connect_to_region(region, | |
aws_access_key_id=access_key, | |
aws_secret_access_key=secret_key) | |
reservations = ec2_conn.get_all_reservations() | |
for reservation in reservations: | |
print region+':',reservation.instances | |
for vol in ec2_conn.get_all_volumes(): | |
print region+':',vol.id | |
def main(): | |
regions = ['us-east-1','us-west-1','us-west-2','eu-west-1','sa-east-1', | |
'ap-southeast-1','ap-southeast-2','ap-northeast-1'] | |
parser = argparse.ArgumentParser() | |
parser.add_argument('access_key', help='Access Key'); | |
parser.add_argument('secret_key', help='Secret Key'); | |
args = parser.parse_args() | |
global access_key | |
global secret_key | |
access_key = args.access_key | |
secret_key = args.secret_key | |
for region in regions: get_ec2_instances(region) | |
if __name__ =='__main__':main() |
You can run this code as
python list.py <aws_access_key> <aws_secret_key>
Suggest what else would like to be covered in this long-term project. Let me know if you are good in Python/Boto & would like to contribute to it.
November 29, 2013 1 Comment
In June 2013 at Analytics @ WebScale conference, Facebook announced Presto which they were using internally to process petabytes of data. It has now been made open-source as per a recent post by Facebook Engineering.
Hive, which was initially developed by Facebook used MapReduce chaining to transform a query into multiple MapReduce Jobs. Presto different as it does not use MapReduce & is 10 times faster that Hive for most queries as per Facebook. Presto allows querying data where it lives, including Hive, HBase, relational databases or even proprietary data stores. You can issue SQL like queries on Presto that include left/right outer join, subqueries or even common aggregate functions. A single Presto query can combine data from multiple sources, allowing for analytics across your entire organization.
Facebook uses Presto internally to interactively query over a petabyte of data by about 1000 employees running more than 30,000 queries a day. Currently its also being used by leading internet companies including Airbnb and Dropbox.
You can find more about Presto here :
Presto Website
Facebook Blog about Presto
Gigaom Story
—
This blog is cross-posted from here
August 5, 2013 27 Comments
ssh -i training.pem ec2-user@54.208.114.96
10.0.1.234
10.0.1.235
sudo iptables -t nat -A PREROUTING -p tcp --dport 10234 -j DNAT --to-destination 10.0.1.234:22
sudo iptables -t nat -A PREROUTING -p tcp --dport 10235 -j DNAT --to-destination 10.0.1.235:22
ssh -p 10234 -i /home/himanshu/Downloads/training.pem ec2-user@54.208.114.96
ssh -p 10235 -i /home/himanshu/Downloads/training.pem ec2-user@54.208.114.96
Recent Comments