SlideShare una empresa de Scribd logo
1 de 15
Descargar para leer sin conexión
Introduction to
AMAZON WEB
SERVICES
and
BOTO




 @chteijon
 @MindtheByte
EC2: Elastic Compute Cloud




  @chteijon
  @MindtheByte
                             2
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
EC2: AMI (Amazon Machine Image)




  @chteijon
  @MindtheByte
                                  4
EC2: Spot instance




     On demand
          price:            t!
                      0% oun
                     9 c
                      dis

  @chteijon
  @MindtheByte
                                 5
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
S3: Simple storage service




  @chteijon
  @MindtheByte
                             7
S3: Simple storage service
            Boto code:
# Connect to a bucket
s3conn = boto.s3.connection.S3Connection( KEY_ID, KEY_SECRET )
s3bucket = s3conn.get_bucket(“meetup_python_cloud”)

# Set a key
s3key = boto.s3.key.Key(bucketconn)
s3key.key = “data/file.txt”
s3key.set_contents_from_string(“Some info”,policy=policy)

# Get a key
s3key.key = “data/anotherfile.txt”
value=s3key.get_contents_as_string()

# Delete a key
S3bucket.delete_key(s3key)




   @chteijon
   @MindtheByte
                                                                 8
How does all this sum up?




                 Amazon S3
  @chteijon
  @MindtheByte
                             9
How does all this sum up?
                             AMI




                 Amazon S3
  @chteijon
  @MindtheByte
                                   10
How does all this sum up?




                 Amazon S3
  @chteijon
  @MindtheByte
                             11
How does all this sum up?




                 Amazon S3
  @chteijon
  @MindtheByte
                             12
How does all this sum up?




                 Amazon S3
  @chteijon
  @MindtheByte
                             13
Common alternatives to distribute jobs




                         Amazon RDS :
                  Relational Dabatase Service



                       Amazon SQS:
                    Simple Queue Service



   @chteijon
   @MindtheByte
                                                14
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

Más contenido relacionado

Similar a Intorduction to AWS and Boto

A Novel Secure Cloud SAAS Integration for User Authenticated Information
A Novel Secure Cloud SAAS Integration for User Authenticated InformationA Novel Secure Cloud SAAS Integration for User Authenticated Information
A Novel Secure Cloud SAAS Integration for User Authenticated Information
ijtsrd
 

Similar a Intorduction to AWS and Boto (20)

HPC on AWS
HPC on AWSHPC on AWS
HPC on AWS
 
Machine Learning in Microsoft Azure
Machine Learning in Microsoft AzureMachine Learning in Microsoft Azure
Machine Learning in Microsoft Azure
 
HPC on AWS
HPC on AWSHPC on AWS
HPC on AWS
 
Talk at NCRR P41 Director's Meeting
Talk at NCRR P41 Director's MeetingTalk at NCRR P41 Director's Meeting
Talk at NCRR P41 Director's Meeting
 
A Novel Secure Cloud SAAS Integration for User Authenticated Information
A Novel Secure Cloud SAAS Integration for User Authenticated InformationA Novel Secure Cloud SAAS Integration for User Authenticated Information
A Novel Secure Cloud SAAS Integration for User Authenticated Information
 
Amazon2009 04 22 Amsterdam
Amazon2009 04 22 AmsterdamAmazon2009 04 22 Amsterdam
Amazon2009 04 22 Amsterdam
 
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
Amazon SageMaker in Practice - Workshop at Big Data Moscow 2018 (10.10.2018)
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
데이터 기반 의사결정을 통한 비지니스 혁신 - 윤석찬 (AWS 테크에반젤리스트)
데이터 기반 의사결정을 통한 비지니스 혁신 - 윤석찬 (AWS 테크에반젤리스트)데이터 기반 의사결정을 통한 비지니스 혁신 - 윤석찬 (AWS 테크에반젤리스트)
데이터 기반 의사결정을 통한 비지니스 혁신 - 윤석찬 (AWS 테크에반젤리스트)
 
Top 23 Things Not to Do in AWS
Top 23 Things Not to Do in AWSTop 23 Things Not to Do in AWS
Top 23 Things Not to Do in AWS
 
Real Time Processing Using Twitter Heron by Karthik Ramasamy
Real Time Processing Using Twitter Heron by Karthik RamasamyReal Time Processing Using Twitter Heron by Karthik Ramasamy
Real Time Processing Using Twitter Heron by Karthik Ramasamy
 
Blockchain On Azure
Blockchain On AzureBlockchain On Azure
Blockchain On Azure
 
Azure Functions, AI & Xamarin - How to use the Cloud to Your Advantage
Azure Functions, AI & Xamarin - How to use the Cloud to Your AdvantageAzure Functions, AI & Xamarin - How to use the Cloud to Your Advantage
Azure Functions, AI & Xamarin - How to use the Cloud to Your Advantage
 
(BDT210) Building Scalable Big Data Solutions: Intel & AOL
(BDT210) Building Scalable Big Data Solutions: Intel & AOL(BDT210) Building Scalable Big Data Solutions: Intel & AOL
(BDT210) Building Scalable Big Data Solutions: Intel & AOL
 
Activity Recognition
Activity RecognitionActivity Recognition
Activity Recognition
 
2018 05 hype lightning talk
2018 05 hype lightning talk2018 05 hype lightning talk
2018 05 hype lightning talk
 
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)
Build Your Mobile App Faster with AWS Mobile Services (Part 1 - AWS)
 
Activity Recognition project
Activity Recognition projectActivity Recognition project
Activity Recognition project
 
Metaverse and Digital Twins on Enterprise-Public.pdf
Metaverse and Digital Twins on Enterprise-Public.pdfMetaverse and Digital Twins on Enterprise-Public.pdf
Metaverse and Digital Twins on Enterprise-Public.pdf
 
Smart Grid Analytics: All That Remains to be Ready is You
Smart Grid Analytics: All That Remains to be Ready is YouSmart Grid Analytics: All That Remains to be Ready is You
Smart Grid Analytics: All That Remains to be Ready is You
 

Más de Mind the Byte

Aleida Alcaide, European cloud partnership. Iniatives of the European Public ...
Aleida Alcaide, European cloud partnership. Iniatives of the European Public ...Aleida Alcaide, European cloud partnership. Iniatives of the European Public ...
Aleida Alcaide, European cloud partnership. Iniatives of the European Public ...
Mind the Byte
 
Service and Support for Science IT -Peter Kunzst, University of Zurich
Service and Support for Science IT-Peter Kunzst, University of ZurichService and Support for Science IT-Peter Kunzst, University of Zurich
Service and Support for Science IT -Peter Kunzst, University of Zurich
Mind the Byte
 
Progress towards security in the Cloud-Héctor Sánchez, Microsoft
Progress towards security in the Cloud-Héctor Sánchez, MicrosoftProgress towards security in the Cloud-Héctor Sánchez, Microsoft
Progress towards security in the Cloud-Héctor Sánchez, Microsoft
Mind the Byte
 
IP strategies to protect your cloud technology-Florian Michalek, Bardehele Pa...
IP strategies to protect your cloud technology-Florian Michalek, Bardehele Pa...IP strategies to protect your cloud technology-Florian Michalek, Bardehele Pa...
IP strategies to protect your cloud technology-Florian Michalek, Bardehele Pa...
Mind the Byte
 
Shared Clinical History of Catalonia-Ignasi Garcia-Milà, Fundació TICSalut
Shared Clinical History of Catalonia-Ignasi Garcia-Milà, Fundació TICSalutShared Clinical History of Catalonia-Ignasi Garcia-Milà, Fundació TICSalut
Shared Clinical History of Catalonia-Ignasi Garcia-Milà, Fundació TICSalut
Mind the Byte
 

Más de Mind the Byte (7)

Aleida Alcaide, European cloud partnership. Iniatives of the European Public ...
Aleida Alcaide, European cloud partnership. Iniatives of the European Public ...Aleida Alcaide, European cloud partnership. Iniatives of the European Public ...
Aleida Alcaide, European cloud partnership. Iniatives of the European Public ...
 
Service and Support for Science IT -Peter Kunzst, University of Zurich
Service and Support for Science IT-Peter Kunzst, University of ZurichService and Support for Science IT-Peter Kunzst, University of Zurich
Service and Support for Science IT -Peter Kunzst, University of Zurich
 
Progress towards security in the Cloud-Héctor Sánchez, Microsoft
Progress towards security in the Cloud-Héctor Sánchez, MicrosoftProgress towards security in the Cloud-Héctor Sánchez, Microsoft
Progress towards security in the Cloud-Héctor Sánchez, Microsoft
 
IP strategies to protect your cloud technology-Florian Michalek, Bardehele Pa...
IP strategies to protect your cloud technology-Florian Michalek, Bardehele Pa...IP strategies to protect your cloud technology-Florian Michalek, Bardehele Pa...
IP strategies to protect your cloud technology-Florian Michalek, Bardehele Pa...
 
Shared Clinical History of Catalonia-Ignasi Garcia-Milà, Fundació TICSalut
Shared Clinical History of Catalonia-Ignasi Garcia-Milà, Fundació TICSalutShared Clinical History of Catalonia-Ignasi Garcia-Milà, Fundació TICSalut
Shared Clinical History of Catalonia-Ignasi Garcia-Milà, Fundació TICSalut
 
Introduction to cloud computing
Introduction to cloud computingIntroduction to cloud computing
Introduction to cloud computing
 
Mind the Byte
Mind the ByteMind the Byte
Mind the Byte
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Intorduction to AWS and Boto

  • 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 bucket s3conn = boto.s3.connection.S3Connection( KEY_ID, KEY_SECRET ) s3bucket = s3conn.get_bucket(“meetup_python_cloud”) # Set a key s3key = boto.s3.key.Key(bucketconn) s3key.key = “data/file.txt” s3key.set_contents_from_string(“Some info”,policy=policy) # Get a key s3key.key = “data/anotherfile.txt” value=s3key.get_contents_as_string() # Delete a key S3bucket.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