Click here to load reader

Intorduction to AWS and Boto

  • View
    802

  • Download
    2

Embed Size (px)

DESCRIPTION

Introductory talk of Christian Teijón (CTO of Mind the Byte) about Amazon Web Services and Python Boto

Text of Intorduction to AWS and Boto

  • 1. Introduction toAMAZON WEBSERVICESandBOTO @chteijon @MindtheByte
  • 2. EC2: Elastic Compute Cloud @chteijon @MindtheByte 2
  • 3. EC2: Elastic Compute Cloud Boto code: KEY_ID=AGIAJPPYZBKTWGGX8AHS KEY_SECRET=RwXTKmn7Ujfqmdsakcs/MRdf89sdSDffxU8sjRuD REGION="us-west-1" ec2 = boto.connect_ec2( KEY_ID, KEY_SECRET, region=REGION ) reservation = ec2.run_instances( image_id=AMI_ID, key_name=KEY_HANDLE, instance_type=INSTANCE_TYPE, security_groups = [ SGS ] ) @chteijon @MindtheByte 3
  • 4. EC2: AMI (Amazon Machine Image) @chteijon @MindtheByte 4
  • 5. EC2: Spot instance On demand price: t! 0% oun 9 c dis @chteijon @MindtheByte 5
  • 6. EC2: Spot instance Boto code:ec2 = boto.connect_ec2( KEY_ID, KEY_SECRET, region=REGION )ec2_conn.request_spot_instances( price=0.1, image_id=AMI, count=1, key_name=KEY_HANDLE, security_group_ids=[ SGS ] , instance_type= "m1.xlarge", user_data=userdata ) On demand price: t! 0% oun 9 c dis @chteijon @MindtheByte 6
  • 7. S3: Simple storage service @chteijon @MindtheByte 7
  • 8. S3: Simple storage service Boto code:# Connect to a buckets3conn = boto.s3.connection.S3Connection( KEY_ID, KEY_SECRET )s3bucket = s3conn.get_bucket(meetup_python_cloud)# Set a keys3key = boto.s3.key.Key(bucketconn)s3key.key = data/file.txts3key.set_contents_from_string(Some info,policy=policy)# Get a keys3key.key = data/anotherfile.txtvalue=s3key.get_contents_as_string()# Delete a keyS3bucket.delete_key(s3key) @chteijon @MindtheByte 8
  • 9. How does all this sum up? Amazon S3 @chteijon @MindtheByte 9
  • 10. How does all this sum up? AMI Amazon S3 @chteijon @MindtheByte 10
  • 11. How does all this sum up? Amazon S3 @chteijon @MindtheByte 11
  • 12. How does all this sum up? Amazon S3 @chteijon @MindtheByte 12
  • 13. How does all this sum up? Amazon S3 @chteijon @MindtheByte 13
  • 14. Common alternatives to distribute jobs Amazon RDS : Relational Dabatase Service Amazon SQS: Simple Queue Service @chteijon @MindtheByte 14
  • 15. Key advantatges of the cloud (almost) Infinite computational power available to speed up your computations Pay-as-you-go, no need of initial investment or hardware maintenance costs. @chteijon @MindtheByte 15

Search related