Warning: Trying to access array offset on value of type bool in /home/topgsnkq/public_html/nurselite.com/wp-content/themes/enfold/framework/php/function-set-avia-frontend.php on line 637

Lab 3 AWS Application Programming Interfaces

PMCCA 625 Project 2: Lab 3 AWS Application Programming InterfacesCCA 625 Project 2: Lab 3 AWS Applica!on Programming InterfacesIn 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 Cloud9environment.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 AWS1. Python (h”ps://www.python.org/) is a programming language that has gained popularity in recentyears. Most of its implementa!ons involve a direct or indirect interpreter, so it is not compiled into themachine-level language. Programmers like Python because it can be successfully used both for wri!ngshort 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’sbusiness 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://aws.amazon.com/sdk-for-python/) , which means that there https://paperwriters.xyz/uncategorized/lab-3-aws-application-programming-interfaces/ is a library of Python classes corresponding to AWS resources, andcloud developers can invoke opera!ons on objects created from these classes. The SDK is called “boto”and the latest version is “boto3(h”ps://boto3.amazonaws.com/v1/documenta!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_ Cloud9 Ubuntuenvironment 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!lthe SDK is installed.Course Resourcehttps://www.python.org/https://aws.amazon.com/sdk-for-python/https://boto3.amazonaws.com/v1/documentation/api/latest/index.html6/12/21, 3:48 PMCCA 625 Project 2: Lab 3 AWS Application Programming InterfacesPage 2 of 4https://leocontent.umgc.edu/content/umuc/tgs/cca/cca625/2212/course…t-2–lab-3-aws-application-programming-interfaces-.html?ou=602744#Source: Amazon Web ServicesStep 2: Analyze a Python Script, Provisioning an EC2 Instance6. Download to your computer this Python script: create_instance.py (/content/dam/course-content/tgs/cca/cca-625/document/create_instance.py?ou=602744)7. In Cloud9, click on “File – Upload Local Files,” and upload the script to your Cloud9 environment.8. Click on the “create_instance.py” file in your environment file tree on the le#. It opens in a text editortab.Source: Amazon Web ServicesAnalyze the script:Lines 2, 3: The boto3 Python SDK module components are made available to the script.https://leocontent.umgc.edu/content/dam/course-content/tgs/cca/cca-625/document/create_instance.py?ou=6027446/12/21, 3:48 PMCCA 625 Project 2: Lab 3 AWS Application Programming InterfacesPage 3 of 4https://leocontent.umgc.edu/content/umuc/tgs/cca/cca625/2212/course…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 invokingac!ons of the EC2 service.Lines 12–14: Values of parameters needed for instance crea!on are defined. Image_id specifies theUbuntu 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(h”ps://boto3.amazonaws.com/v1/documenta!on/api/latest/reference/services/ec2.html#EC2.Client.run_instances)to create a single EC2 instance. All required parameters are specified, plus an op!onal name tag to beable 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) containinginforma!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 Output9. In the editor tab, line 14, https://paperwriters.xyz/uncategorized/lab-3-aws-application-programming-interfaces/ type in the name of your key pair inside single quotes. You can use the keypairyou’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 create_instance.py” 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 andinclude it in your lab report.https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html%23EC2.Client.run_instances6/12/21, 3:48 PMCCA 625 Project 2: Lab 3 AWS Application Programming InterfacesPage 4 of 4https://leocontent.umgc.edu/content/umuc/tgs/cca/cca625/2212/course…t-2–lab-3-aws-application-programming-interfaces-.html?ou=602744#Source: Amazon Web Services12. 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 Provisioned13. To verify that the instance is provisioned, go back to the AWS console, select the EC2 service, and clickon the “Instances” label on the le#. Select the instance created by the Python script. Take a screenshotand include it in your lab report.14. Write and submit the lab report, showing the steps you’ve taken and all requested screenshots withbrief 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 associatedwith the Cloud9 environment, and delete the Cloud9 environment.© 2021 University of Maryland Global CampusAll 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 atexternal sites.

 
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"

"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!":

Get started