Amazon EC2 using Python (boto)
Infrastructure as a Service (IaaS)
Introduction to Amazon EC2
• Amazon EC2 is an Infrastructure as a Service
(IaaS).
• Provides scalable, pay-as-you-go compute
capacity in the cloud.
• Offers virtual machines (instances) launched in
Amazon’s cloud.
• Accessible via web service APIs (like boto in
Python).
Establishing Connection to EC2
• Use boto.ec2.connect_to_region function.
• Parameters:
- EC2 region
- AWS access key
- AWS secret key
• Creates a connection handle to EC2.
Launching an EC2 Instance
• Use conn.run_instances function.
• Parameters:
- AMI ID
- Instance Type
- EC2 Key Pair
- Security Group
• Returns a reservation object.
Working with Instances
• Reservation contains instances.
• Access using reservation.instances.
• Update instance status using
instance.update().
2)Amazon AutoScaling
• Amazon AutoScaling allows automatically
scaling of Amazon EC2 capacity up or out
according to user defined conditions.
• The Python code for creating an AutoScaling
group.
3) Amazon S3
• Amazon S3 is an online cloud-based data
storage infrastructure for storing and
retrieving any amount of data.
• S3 provides highly reliable, scalable, fast, fully
redundant and affordable storage
infrastructure.
• The Python code for uploading a file to
Amazon S3 cloud storage.
print(f"File '{file_name}' uploaded to S3 bucket '{bucket_name}' as '{object_name}'")
Python for Google Cloud Platform
1)Google Compute Engine (GAE):-
• Google Compute Engine provides scalable and
flexible virtual machine computing
capabilities in the cloud.
• The Python program for launching Google
Compute Engine instance.

Amazon_EC2_Python in cloud computing subject

  • 1.
    Amazon EC2 usingPython (boto) Infrastructure as a Service (IaaS)
  • 2.
    Introduction to AmazonEC2 • Amazon EC2 is an Infrastructure as a Service (IaaS). • Provides scalable, pay-as-you-go compute capacity in the cloud. • Offers virtual machines (instances) launched in Amazon’s cloud. • Accessible via web service APIs (like boto in Python).
  • 3.
    Establishing Connection toEC2 • Use boto.ec2.connect_to_region function. • Parameters: - EC2 region - AWS access key - AWS secret key • Creates a connection handle to EC2.
  • 4.
    Launching an EC2Instance • Use conn.run_instances function. • Parameters: - AMI ID - Instance Type - EC2 Key Pair - Security Group • Returns a reservation object.
  • 5.
    Working with Instances •Reservation contains instances. • Access using reservation.instances. • Update instance status using instance.update().
  • 6.
    2)Amazon AutoScaling • AmazonAutoScaling allows automatically scaling of Amazon EC2 capacity up or out according to user defined conditions. • The Python code for creating an AutoScaling group.
  • 9.
    3) Amazon S3 •Amazon S3 is an online cloud-based data storage infrastructure for storing and retrieving any amount of data. • S3 provides highly reliable, scalable, fast, fully redundant and affordable storage infrastructure. • The Python code for uploading a file to Amazon S3 cloud storage.
  • 10.
    print(f"File '{file_name}' uploadedto S3 bucket '{bucket_name}' as '{object_name}'")
  • 11.
    Python for GoogleCloud Platform 1)Google Compute Engine (GAE):- • Google Compute Engine provides scalable and flexible virtual machine computing capabilities in the cloud. • The Python program for launching Google Compute Engine instance.