Lab 3 aws application programming interfaces


PMCCA 625 Project 2: Lab 3 AWS Application Programming Interfaces

CCA 625 Project 2: Lab 3 AWS Applica!on Programming Interfaces

In this lab exercise, you will perform the following steps:

1. Explore AWS APIs and Python SDK for AWS, and install Python SDK in your ASW Cloud9


2. Analyze a Python script, provisioning an EC2 instance.

3. Run a Python script, provisioning an EC2 instance, and analyze output.

4. Verify that instance has been provisioned.

You will write a lab report describing the steps you’ve taken and include the screenshots requested.

Step 1: Explore AWS APIs and Python SDK for AWS

1. Python (h”ps:// is a programming language that has gained popularity in recent

years. Most of its implementa!ons involve a direct or indirect interpreter, so it is not compiled into the

machine-level language. Programmers like Python because it can be successfully used both for wri!ng

short scripts and also in complex so#ware systems. Python is an object-oriented language.

Programmers can create so#ware objects—units of func!onality and associated data—and use them.

Python APIs provide libraries of classes—blueprints for objects—that model en!!es in the API’s

business domain and provide opera!ons to be carried out on these en!!es.

2. AWS provides a so#ware development kit (SDK) for Python (h”ps://

python/) , which means that there is a library of Python classes corresponding to AWS resources, and

cloud developers can invoke opera!ons on objects created from these classes. The SDK is called “boto”

and the latest version is “boto3

(h”ps://!on/api/latest/index.html) .”

3. Log in to your AWS Educate account. Click on the “My Classrooms” bu”on at the bo”om of the screen,

and go to the CCA 625 classroom. Click on the “AWS Console” bu”on.

4. On the AWS Services page, under the “Developer Tools” sec!on at the bo”om, select the “Cloud9”

service. In the Cloud9 dashboard, you should see the CCA625_<your ini!als> Cloud9 Ubuntu

environment you created in Lab 1. Click on it and wait un!l the Cloud9 IDE screen opens.

5. Cloud9 comes with the Python language installed, along with the Python module installer called “pip,”

but the AWS boto3 SDK is not installed. Type “pip install boto3” in the bash console tab and wait un!l

the SDK is installed.

Course Resource

6/12/21, 3:48 PMCCA 625 Project 2: Lab 3 AWS Application Programming Interfaces

Page 2 of 4…t-2–lab-3-aws-application-programming-interfaces-.html?ou=602744#

Source: Amazon Web Services

Step 2: Analyze a Python Script, Provisioning an EC2 Instance

6. Download to your computer this Python script: (/content/dam/course-


7. In Cloud9, click on “File – Upload Local Files,” and upload the script to your Cloud9 environment.

8. Click on the “” file in your environment file tree on the le#. It opens in a text editor


Source: Amazon Web Services

Analyze the script:

Lines 2, 3: The boto3 Python SDK module components are made available to the script.

6/12/21, 3:48 PMCCA 625 Project 2: Lab 3 AWS Application Programming Interfaces

Page 3 of 4…t-2–lab-3-aws-application-programming-interfaces-.html?ou=602744#

Line 9: The client object for the EC2 service is created. This object provides methods for invoking

ac!ons of the EC2 service.

Lines 12–14: Values of parameters needed for instance crea!on are defined. Image_id specifies the

Ubuntu 18.1 image. You need to type in the name of your key pair available in your student account.

Create one in the AWS console in the EC2 service under Key Pairs if needed.

Line 18: This is the call to the run_instances method of the EC2 Python service


to create a single EC2 instance. All required parameters are specified, plus an op!onal name tag to be

able to tell your instance in the instance list in the console.

Line 36: The result is printed, which is the Python dic!onary (list of key-object pairs) containing

informa!on about the instance being provisioned.

Line 39: In case of an error being raised, the error object is “thrown,” which is printed.

Step 3: Run a Python Script Provisioning an EC2 Instance and Analyze Output

9. In the editor tab, line 14, type in the name of your key pair inside single quotes. You can use the keypair

you’ve used in Project 1 Lab 3 Step 10. Take a screenshot and include it in your lab report.

10. Close the text editor tab with the modified script and save it.

11. Maximize the bash command terminal tab, type “python” at the command prompt,

and hit “Enter.” If the script executes successfully, you will see the instance informa!on dic!onary.

Confirm that the instance has the proper image, type, key pair name, and tag. Take a screenshot and

include it in your lab report.

6/12/21, 3:48 PMCCA 625 Project 2: Lab 3 AWS Application Programming Interfaces

Page 4 of 4…t-2–lab-3-aws-application-programming-interfaces-.html?ou=602744#

Source: Amazon Web Services

12. In case of an error, you will see an error message. Fix the error and run the script again.

Step 4: Verify the Instance Has Been Provisioned

13. To verify that the instance is provisioned, go back to the AWS console, select the EC2 service, and click

on the “Instances” label on the le#. Select the instance created by the Python script. Take a screenshot

and include it in your lab report.

14. Write and submit the lab report, showing the steps you’ve taken and all requested screenshots with

brief explana!ons. Submit the lab report in the Project 2 Step 4 submission box.

15. A#er you are done and your Project 2 report is graded, remember to terminate the instance associated

with the Cloud9 environment, and delete the Cloud9 environment.

© 2021 University of Maryland Global Campus

All links to external sites were verified at the !me of publica!on. UMGC is not responsible for the validity or integrity of informa!on located at

external sites.

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

We value our customers, and so ensure that our papers are 100 percent original. Our Team of professionals does not miss the mark; they ensure that step by step each paper is written uniquely. We never duplicate or work as we compare papers rest assured. We deliver our work a day before time to ensure that you don’t miss your deadlines. It is not only doing the work but delivering it at the right time. We capture the consequences of late remittances. .

Money-back guarantee

We value customer satisfaction here at and make sure that you get the best value for your Money. It happens that sometimes you can pay twice for your order or may want to cancel it, or you feel that it doesn’t meet your requirements; our money back guarantee will give you the opportunity to get back your money. We will also refund 100% of money paid double. In case your paper does not satisfy your requirements , we request that you notify us via writing within 2 days otherwise on the third day we will assume that you have been satisfied. Do all your correspondences through our email address

Read more

Zero-plagiarism guarantee

At, our professional writers know the consequence plagiarism does for our clients. We have updated software’s such as article checker and copyscape to check for originality of the custom papers before submission of the final paper to the you. Our guarantee to the customer is that we will write 100% original papers for them that are quality, timely and of low cost. We have experienced professional and competent PhD writers who will write quality custom papers for you..

Read more

Free-revision policy

. At, we are proud to provide top-quality Essay writing service to our esteemed customers. We are ready to take up that challenging academic assignment that is giving you sleepless nights and simplify it for you according to your desired requirements. We are willing to revise your paper if it does not meet your requirements. At, we do not compromise with quality; thus, we offer unlimited free revisions until the customer is satisfied with their custom paper. Our unlimited free revision services are provided under the following terms:.. .

Read more

Privacy policy knows that client’s information is an essential tool for our company. It means that whatever the client requests from our service is kept strictly confidential. It means that whoever writes for this company understands the terms and conditions hence you should not be worried because you will never see your work somewhere else...

Read more

Fair-cooperation guarantee

Rest assured that we will always be attentive to your needs and requirements. We belief in the phrase treat your neighbour as you would want them to treat you. We leave nothing to chance and always look forward to a good interaction with each other.. .

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages