Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
454 views

Module 2 - Introduction To Developing On AWS

Uploaded by

doaahemaid01
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
454 views

Module 2 - Introduction To Developing On AWS

Uploaded by

doaahemaid01
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 61

AWS Academy Cloud Developing

Module 02 Student Guide


Version 2.0.4
200-ACCDEV-20-EN-SG
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.

This work may not be reproduced or redistributed, in whole or in part,


without prior written permission from Amazon Web Services, Inc.
Commercial copying, lending, or selling is prohibited.

All trademarks are the property of their owners.


AWS Training and Certification AWS Academy Cloud Developing

Contents
Module 2: Introduction to Developing on AWS 4

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 3
AWS Training and Certification Module 2: Introduction to Developing on AWS

Module 2: Introduction to Developing


on AWS
AWS Academy Cloud
Developing

Welcome to Module 2: Introduction to Developing on AWS

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 4
AWS Training and Certification Module 2: Introduction to Developing on AWS

Section 1: Introduction
Module 2: Introduction to Developing on AWS

Section 1: Introduction.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 5
AWS Training and Certification Module 2: Introduction to Developing on AWS

Module At the end of this module, you should be


objectives able to:
• Recognize the systems development lifecycle
(SDLC).
• Describe how to start developing on AWS.
• Identify the benefits of using the AWS Cloud9
integrated development environment (IDE).
• Identify the benefits of using Amazon
CodeWhisperer with AWS Cloud9.
• Develop and run a simple program using AWS
Cloud9 and Amazon CodeWhisperer.
• Indicate how to use AWS SDKs.

At the end of this module, you should be able to:


• Recognize the systems development lifecycle (SDLC).
• Describe how to start developing on AWS.
• Identify the benefits of using AWS Cloud9 integrated development
environment (IDE).
• Identify the benefits of using Amazon CodeWhisperer with AWS Cloud9.
• Develop and run a simple program using AWS Cloud9 and Amazon
CodeWhisperer.
• Indicate how to use AWS SDKs.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 6
AWS Training and Certification Module 2: Introduction to Developing on AWS

Module overview
Sections Lab
1. Introduction Exploring AWS CloudShell and the
2. Systems development lifecycle AWS Cloud9 IDE

3. Steps to get started developing


on AWS
4. Fundamentals of working with
the AWS SDKs
Demonstration
Installing the AWS CLI

Knowledge check
4

This module includes the following sections:


1. Introduction
2. Systems development lifecycle
3. Steps to get started developing on AWS
4. Fundamentals of working with the AWS SDKs

This module also includes:


• A demonstration of installing the AWS CLI
• A lab where you learn how to work with AWS Cloud9

Finally, you will complete a knowledge check to test your understanding of key
concepts covered in this module.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 7
AWS Training and Certification Module 2: Introduction to Developing on AWS

Café business requirement

Sofía wants to start developing a web presence for the café. Before she starts coding, she wants
to decide on a development environment to use to develop and run her code.

Sofía wants to start developing a web presence for the café. Sofía has Python
development skills, and she is learning more about how to develop solutions in
the cloud. Before she starts coding, she wants to decide on a development
environment to use to develop and run her code. She decides to explore at least
two options that are available on AWS.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 8
AWS Training and Certification Module 2: Introduction to Developing on AWS

Cloud development tools as part of developing a cloud


application

The diagram on this slide gives an overview of the application that you will build
through the labs in this course. The highlighted portions are relevant to this
module.

As highlighted in the diagram, you can use the AWS Management Console to
launch AWS CloudShell or create an AWS Cloud9 development environment.
With either CloudShell or AWS Cloud9, you can use the AWS Command Line
Interface (AWS CLI) or AWS SDK for Python (Boto3) to interact with AWS
resources (for example, an S3 bucket).

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 9
AWS Training and Certification Module 2: Introduction to Developing on AWS

Section 2: Systems development


lifecycle
Module 2: Introduction to Developing on AWS

Section 2: Systems development lifecycle.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 10
AWS Training and Certification Module 2: Introduction to Developing on AWS

The challenge of software delivery

Enterprises must bridge the gap between the stability of their operations and
rapid feature development.

Quickly Deliver software with zero tolerance for


outages:
• Quickly
Securely • Securely
• Reliably

Reliably

Software development and delivery is a challenge. Developers must quickly build


solutions that are secure, reliable, and can scale to meet customer demands. All
these goals must be accomplished while ensuring the security and integrity of
the system. Methodologies are needed to bridge the gap between operational
stability and rapid feature development.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 11
AWS Training and Certification Module 2: Introduction to Developing on AWS

Systems development lifecycle

Plan Define Design Develop Deploy Maintain

Develop new system

Install new components


and programs

Train users

Test performance

Make adjustments

Software development goes through a series of phases in the systems


development lifecycle (SDLC). The SDLC is a conceptual model that is used in
project management. It describes the stages in an information system
development project, from an initial feasibility study to the maintenance of the
completed application.

In general, an SDLC methodology follows these steps: plan, define, design,


develop, deploy and maintain. This course will primarily focus on the Develop
phase of SDLC. This course will briefly touch on the Deploy phase as well.

In the Develop phase, the new system is developed. New components and
programs must be obtained and installed. System users must be trained, and all
aspects of the system’s performance must be tested. If necessary, bugs must be
fixed and adjustments must be made to improve performance.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 12
AWS Training and Certification Module 2: Introduction to Developing on AWS

SDLC methodologies

Waterfall Agile

Sprint

10

Various SDLC methodologies have been developed. Two of the most common
methods are waterfall and agile.
• Waterfall (or traditional) methodology – This methodology is often
considered to be the classic approach to the SDLC. The waterfall model
describes a sequential development method. Each development phase has
distinct goals and tasks that must be completed before the next phase can
begin. Under this paradigm, product teams might not hear back from
customers for months, and often not until the product is commercialized.

• Agile software development methodology – Agile is a newer conceptual


framework that supports fast-paced, iterative software development. Under
this newer paradigm, product teams push their work to customers as quickly
as possible so that they can collect feedback and improve the previous
iteration of their products. Concepts such as minimum viable product (MVP),
release candidate, velocity, and others are all derived from the agile
approach. There are various agile software development methodologies, such
as Crystal methods, Dynamic Systems Development Method (DSDM), and
Scrum. Under agile, software is developed iteratively in short time periods
that are called sprints, which typically last 1–4 weeks.

When you develop applications in an agile way, your requirements might change
frequently. Developing on AWS enables you to accommodate the changes and
requirements more efficiently.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 13
AWS Training and Certification Module 2: Introduction to Developing on AWS

Major phases of software development


Develop Deploy Maintain

Code Build Test

• Check in source • Compile code • Test integration • Deploy code to • Monitor code in
code, such as • Perform unit with other production production to
.java files tests systems environments quickly detect
• Peer-review new • Run style • Perform load unusual activity
code checkers tests or errors
• Gather code • Test user
metrics interface (UI)
• Create container • Perform
images penetration tests

11

The five major phases of software development are: Code, Build, Test, Deploy,
and Maintain. Note that Source, Build, and Test fall under the Develop stage of
the SDLC. Each phase provides increased confidence that the code will work in
the way it’s intended when it’s eventually released to customers. The following
overview lists the activities that occur in each phase:
• During the Code phase, developers write application source code and check
changes into a source code repository, such as a Git repository or an AWS
CodeCommit repository. Many teams use code reviews to provide peer
feedback of code quality before they ship code into production. Other teams
use pair programming as a way to provide real-time peer feedback.
• During the Build phase, an application’s source code is compiled and the
quality of the code is tested on the build machine. The most common type of
quality check is an automated test that doesn’t require a server to run. These
quality tests can be initiated from a test harness. Some teams extend their
quality tests to include code metrics and style checks.
• During the Test phase, additional tests (that can’t be done during the Build
phase) are performed. These tests require the software to be deployed to a
production-like environment. Often, these tests include integration testing
with other live systems, load testing, user interface (UI) testing, and
penetration testing. A common pattern is for engineers to deploy builds to a
personal development stage, where they can check that their automated
tests work correctly. They then deploy code to pre-production stages, where
their application interacts with other systems to ensure that the software
works in an integrated environment.
• Finally, code gets deployed to production. Though there are different
deployment strategies, the common goals are to reduce risk when deploying
new changes and to minimize the impact if a bad change is released to
production.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14
AWS Training and Certification Module 2: Introduction to Developing on AWS

• After code is deployed, it must be monitored in production to determine if everything


works as expected.

Each of these steps can be automated without automating the entire release process.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 15
AWS Training and Certification Module 2: Introduction to Developing on AWS

Section 3: Steps to get started


developing on AWS
Module 2: Introduction to Developing on AWS

12

Section 3: Steps to get started developing on AWS.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 16
AWS Training and Certification Module 2: Introduction to Developing on AWS

How to get started developing on AWS

13

**For accessibility: Step 1. Create an AWS account. Step 2. Set up AWS


permissions with IAM. Step 3. Install the development environment with AWS
IDE toolkits and AWS Cloud9. Step 4. Interact with AWS services with AWS SDKs
and AWS CLI. End description.

Before you start developing applications on AWS, you must do a few key things.
First, you will need an AWS account and you must also create an AWS Identity
and Access Management (IAM) user. This process includes setting up AWS
permissions to access specific services and operations. Next, you must install
your development environment for your language of choice. You must then
install the AWS SDK for the language that you will use—or the AWS Command
Line Interface (or AWS CLI)—so that you can interact with AWS services.

This section will discuss each AWS offering that’s involved in setting up AWS
permissions, installing the development environment, and interacting with AWS
services. Permissions will be covered in another module in this course.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 17
AWS Training and Certification Module 2: Introduction to Developing on AWS

Getting started: AWS account


Go to aws.amazon.com to Choose sign in to the console
Create an create an account if you already have an
AWS account account

14

The steps to create an AWS account are as follows:


1. Open the AWS homepage at http://aws.amazon.com.
2. Choose Create an AWS Account.
• Note: If you signed into AWS recently with the same browser, choose
Sign in to the Console. If Create a new AWS account isn’t available,
then choose Sign in to a different account and then choose Create a
new AWS account.
3. Enter the requested information and then choose Continue.
4. Select if the account is personal or professional. For learning purposes,
select personal.
• Note: Both types of accounts (personal or professional) have the
same features.
5. Enter either your personal information or company information to continue.
• If you are creating a professional account, enter the company’s
phone number and an organizational email address. Configuring a
professional account with a personal phone number and email
address can make an account less secure.
• Ensure that you can access the email address that you used. You will
need to access this email address to receive the confirmation
message that your account was created.
6. Read and accept the AWS Customer Agreement at
https://aws.amazon.com/agreement/.
7. Finally, choose Create Account and Continue.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 18
AWS Training and Certification Module 2: Introduction to Developing on AWS

Getting started: Permissions

• Identity (authentication):
Who can use your AWS
resources
Set up AWS • Access management
permissions (authorization):
IAM What resources can they use
and in what ways

15

When first you create an AWS account, you begin with a single sign-on identity
that has complete access to all AWS services and resources in the account. This
identity is called the AWS account root user, and it’s accessed by logging in with
the email address and password that you used to create the account. A best
practice is to not use the root account unless it’s required. Instead, to increase
the security of your AWS account, we recommend that you create an IAM
user that will use access credentials instead of using your AWS account
credentials.

IAM is a service that helps you securely control access to AWS resources for your
users. You use IAM to control who can use your AWS resources (authentication)
and what resources they can use and in what ways (authorization).

IAM enables you to create and manage users, groups, roles, and policies to
control access to AWS services. IAM also enables identity federation between a
corporate directory and AWS services.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 19
AWS Training and Certification Module 2: Introduction to Developing on AWS

IAM example
Example:

• User – John Doe (has AWS credentials).

• Group – John’s IAM user belongs to the


Developer group.

• Role – Trusted AWS entity with the


Developer permissions policies.

• Policy – John’s IAM role is associated


with the Developer policy and has
access to specific services and
operations.
16

For example, consider a situation where you are responsible for an


organization’s users. You could use IAM to set up a user account for each
developer in your organization. Each user has an IAM user account that they
must use to access AWS services. You could then create an IAM role for
developers and associate the developer role with each developer’s user account.
The developer role can be configured with policies that control which services
and operations the role can access. Developers then assume the IAM role to
have the permissions they need to work in the environment. When updates are
needed to the permissions developers require, the IAM Policy associated with
the IAM role is updated and any developer assuming the role gets the required
permissions.

You will learn more about IAM in the next module.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 20
AWS Training and Certification Module 2: Introduction to Developing on AWS

Getting started: Development environment

IDEs and AWS IDE Toolkits:


• AWS Cloud9
• Eclipse IDE (Eclipse Foundation)
• IntelliJ IDEA (JetBrains)
• PyCharm (JetBrains)
• Microsoft Visual Studio
Install the • Microsoft Visual Studio Code
development
environment • Microsoft Azure DevOps
• Rider (JetBrains)

17

When you set up your development environment, you need to install your
programming language of choice and an integrated development environment
(IDE). AWS offers several language-specific IDEs for you to write, run, debug, and
deploy applications.

For more details about available AWS SDKs, IDEs, and toolkits, refer to “Tools to
Build on AWS” at https://aws.amazon.com/tools/.

For information about how to install your development environment, follow the
instructions from the technology vendors of the platform and the IDE.

Next, you will learn more about the AWS Cloud9 IDE.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 21
AWS Training and Certification Module 2: Introduction to Developing on AWS

AWS Cloud9

Start projects quickly and


Code together in real time. Build serverless applications.
code with only a browser.

18

AWS Cloud9 is an integrated development environment (IDE) that can be run in a web
browser. Since the environment is hosted in AWS, developers can switch between
desktops, laptops, and even tablets to access and work with their code. AWS Cloud9
has all the expected features of an IDE (code completion, step-through, terminal
interface, debugging, and so on) but also includes capabilities like environment sharing
which enables real-time collaborative coding with other developers. Cloud9 supports
many programming languages such as Python, PHP, JavaScript, C++ and more. When
working with serverless such as AWS Lambda, Cloud9 allows developers to quickly pull
code, make changes, and push the updates directly to Lambda if required.

AWS Cloud9 provides a few key benefits:


• Start projects quickly and code with only a web browser – To use AWS Cloud9, you
need only an AWS account. You can log in to the AWS Management Console, create
an AWS Cloud9 environment, and start using it in your browser.
• Code together in real time – Instead of committing your changes to Git and asking a
peer to review the changes on their machine, both you and your peer can use AWS
Cloud9 to code together in real time. AWS Cloud9 provides real-time feedback. This
feature enables you to access to the code that your peer is entering into the IDE
while they enter it so that you can respond in real time.
• Build serverless applications – You can edit and debug AWS Lambda functions locally,
which reduces the need to upload your code to the Lambda console for testing and
debugging.

For more information about AWS Cloud9, see “AWS Cloud9” at


https://aws.amazon.com/cloud9/.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 22
AWS Training and Certification Module 2: Introduction to Developing on AWS

AWS Cloud9 overview


Development Environment Runtime Environment Version Control System

Amazon Elastic Compute


AWS CodeCommit
Your computer Cloud (Amazon EC2) +
repository
AWS Cloud9 environment
+ OR OR

AWS Cloud9 Your server + Other remote


AWS Cloud9 environment repository type
19

You can use the AWS Cloud9 console to create an AWS Cloud9 development
environment. In AWS Cloud9, an environment is where you store your
development project files and run the tools to develop your applications. When
you create an AWS Cloud9 environment, you can connect it to an Amazon Elastic
Compute Cloud (Amazon EC2) instance or to your own server (called a Secure
Shell, or SSH, environment).

AWS Cloud9 integrates with AWS CodeCommit and other remote repositories so
that you can work with files in your environment. AWS CodeCommit is a fully
managed source control service that hosts secure Git-based repositories. For
more information about AWS CodeCommit, see “AWS CodeCommit” at
https://aws.amazon.com/codecommit/.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 23
AWS Training and Certification Module 2: Introduction to Developing on AWS

AWS Cloud9 editor


• Fully featured editor
• Broad selection of run
configurations
• Integrated debugger
• Integrated tools for
serverless development
• Connectivity to any Linux
server platform
• Built-in terminal
• Collaborative editing and
chat
• Continuous delivery
toolchain
• File-revision history
20

The AWS Cloud9 editor is the tool that you use to write code.

It has standard IDE features, such as:


• Fully featured editor
• Broad selection of run configurations
• Integrated debugger
• Integrated tools for serverless development
• Connectivity to any Linux server platform
• Built-in terminal
• Collaborative editing and chat
• Continuous delivery toolchain
• File-revision history

AWS Cloud9 offers additional features. For example, the AWS Cloud9 editor can
handle large files, such as files with 100,000 or more lines. It offers multiple
themes, built-in support for more than 40 language modes, and customizable
run configurations for your projects. In addition, the editor has a Vim mode and
an Emacs mode, and it has a keybinding editor for customizing how you use
commands.

The editor supports keyboard navigation and commands (similar to other editors
such as SublimeText, or Vim plugins like ctrlp). Shortcuts are available to open
files, open the command pane to run commands, and more. The editor also
ships with a preconfigured version of the AWS CLI and other preinstalled tools so
that you can access your resources.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 24
AWS Training and Certification Module 2: Introduction to Developing on AWS

AWS Cloud9 run configurations

21

When developers configure a project in AWS Cloud9 they can choose from
several runtime environments, which are also known as run configurations.
Developers can choose the appropriate run configuration from the menu. With
Python, developers can also select the version that they want to use. In addition,
developers can create a new runner by using the New Runner option. A runner
is a configuration file, written in JSON, that defines what program (Python, PHP,
gcc, and so on) should be used to run the code and any parameters that may be
needed. For more information about creating custom run configurations, see
“Create a Run Configuration” at
http://docs.aws.amazon.com/console/cloud9/create-run-config.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 25
AWS Training and Certification Module 2: Introduction to Developing on AWS

Using Amazon CodeWhisperer with AWS Cloud9

• CodeWhisperer is an artificial intelligence (AI)


coding companion.
• It generates code suggestions based on comments
and existing code.
• Real-time support for code authoring is within
AWS Cloud9.
Amazon
CodeWhisperer
• It integrates with AWS Cloud9 and several
integrated development environments (IDEs).
• It supports many programming languages.
22

Amazon CodeWhisperer is an artificial intelligence (AI) coding companion that


generates code suggestions based on comments and existing code within AWS
Cloud9 and other supported integrated development environments (IDEs). It
provides real-time support for code authoring directly in your IDE. By
automating repetitive and common coding tasks, it optimizes the use of
developer time so developers can focus on more critical aspects of the project.
CodeWhisperer uses generative AI to give code recommendations based on
natural language comments, the code that’s written, and existing source code.

Along with AWS Cloud9, CodeWhisperer integrates with several other IDEs and
programming languages. For more information about other IDEs and languages
that CodeWhisperer is compatible with, see “Amazon CodeWhisperer” in the
Content Resources page of your course.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 26
AWS Training and Certification Module 2: Introduction to Developing on AWS

Benefits of using Amazon CodeWhisperer

• Accelerate any coding tasks.


• Optimize for AWS.
• Use AI responsibly.
• Enhance application security.
• Generate functions.
• Write unit tests.

23

Amazon CodeWhisperer is trained on billions of lines of code and is best used


for undifferentiated, repetitive, common coding tasks. It helps developers
accelerate any coding task by generating code suggestions in real time. It can
suggest anything from code snippets to complete functions. Developers can get
code suggestions that are optimized for AWS APIs including Amazon Elastic
Compute Cloud (Amazon EC2), AWS Lambda, and Amazon Simple Storage
Service (Amazon S3).

CodeWhisperer helps developers use AI responsibly to avoid bias by filtering out


code suggestions that might be considered biased and unfair.

Additionally, CodeWhisperer also has a security scanner that helps mitigate


security vulnerabilities, safeguarding the integrity of the codebase. When
scanning for security vulnerabilities, CodeWhisperer assesses your code against
multiple sets of standards and best practices. This includes the following:
• Open Worldwide Application Security Project (OWASP) standards
• Crypto library best practices
• AWS security standards

It generates entire functions and logical blocks of code (often consisting of up to 10–15
lines of code) directly in the IDE code editor. CodeWhisperer accelerates the
implementation of unit tests. Not only can it implement the logic for most of the explicit
unit tests, but it often suggests unit tests for edge cases.

For more information about Amazon CodeWhisperer, see “Amazon


CodeWhisperer” in the Content Resources page of your course.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 27
AWS Training and Certification Module 2: Introduction to Developing on AWS

Code generation with Amazon CodeWhisperer


CodeWhisperer is
capable of suggesting
the following:
• Single-line code
completion
• Full function generation
• Block completion
• Docstring, JSDoc, and
Javadoc completion
• Line-by-line
recommendations

24

Amazon CodeWhisperer uses natural language processing of comments in the


code to anticipate how a developer is going to finish a line of code or a
comment line. It can generate a full function, or it can complete a code block. It
can suggest functions to complete docstrings, and it can provide line-by-line
suggestions as a developer codes at their own pace.

CodeWhisperer generates code similar to how the developer would write code,
matching their style and naming conventions. The developer can quickly accept
the top suggestion (tab key), view more suggestions (arrow keys), or continue
writing their own code.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 28
AWS Training and Certification Module 2: Introduction to Developing on AWS

Setting up Amazon CodeWhisperer


CodeWhisperer Individual Tier CodeWhisperer Professional Tier

• Available to use at no additional • Flat subscription fee


cost • Authenticate using AWS IAM Identity
• Authenticate using an AWS Center
Builder ID • Capabilities in the Individual Tier plus
• Provides code suggestions, the following:
reference tracking, and security • Administrative capabilities with
scans organizational license management
• Organizational policy management to set
service policies at the organizational level

25

There are two tiers of service for Amazon CodeWhisperer.

CodeWhisperer Individual Tier


The CodeWhisperer Individual Tier is available to use at no additional cost. Individual
developers can sign up and sign in using an AWS Builder ID. You need an email address
to obtain an AWS Builder ID. The Individual Tier provides code suggestions, reference
tracking, and security scans.

CodeWhisperer Professional Tier


The CodeWhisperer Professional Tier is available for a flat subscription fee to
professionals that have an AWS account. In addition to the capabilities offered in the
Individual Tier, the CodeWhisperer Professional Tier offers administrative capabilities to
organizations that want to provide their developers with access to CodeWhisperer.
Administrators get organizational license management to centrally manage which
developers in an organization should have access to CodeWhisperer. They also get
organizational policy management to set service policies at the organizational level,
such as whether developers are allowed to receive code suggestions that might be
similar to particular open-source training data.

For more information about how to set up Amazon CodeWhisperer see “Setting
up Amazon CodeWhisperer” in the Content Resources page of your course.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 29
AWS Training and Certification Module 2: Introduction to Developing on AWS

Getting started: AWS services

• AWS Management Console


• Programmatically
• AWS Command Line Interface
(AWS CLI)
• AWS software development kits
(SDKs)
• Service application programming
interfaces (APIs)

Interact with
AWS services

26

You can interact with AWS through the AWS Management Console, or you can
interact with AWS programmatically. With programmatic access, services can be
called through the AWS Command Line Interface (AWS CLI), the AWS software
development kit (SDK) for the supported language, or the service application
programming interface (API).

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 30
AWS Training and Certification Module 2: Introduction to Developing on AWS

Interacting with AWS services

27

All AWS services are managed through a common, REST-like API. AWS provides
an API for each of its services.

You can interact with the APIs to access your AWS resources in four ways:
• Directly – You can call the APIs directly.
• AWS Management Console – An implementation of the API calls in a web
console. It provides a rich graphical interface to a majority of the features that
are offered by AWS.
• Note: Occasionally, new features might not be available in the console
when the feature initially launches.
• AWS Command Line Interface (AWS CLI) – An open source tool that enables
you to interact with AWS services by using commands in your command line
interface.
• AWS software development kits (AWS SDKs) – Packages that enable you to
access AWS services and resources in a variety of popular programming
languages.

The AWS CLI and the SDKs provide flexibility. They enable you to create your
own tools and customize existing AWS features. For example, you can create
your own scripts or applications for launching EC2 instances that enforce using a
specific set of Amazon Machine Images (AMIs), add a standard set of tags, and
so on.

You can use these access modes interchangeably. For example, you can create
server EC2 instance through an SDK call. This instance can be queried for its
configuration information by using an AWS CLI command (aws ec2 describe-
instances). Finally, you can terminate the server instance by using the console.
(It might sometimes take a few seconds or a few minutes for changes made

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 31
AWS Training and Certification Module 2: Introduction to Developing on AWS

through the AWS CLI or the API to display in the console.)

For information about the AWS SDKs and AWS CLI, see “Tools to Build on AWS” at
https://aws.amazon.com/tools/.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 32
AWS Training and Certification Module 2: Introduction to Developing on AWS

Command line tools

AWS CLI AWS Tools for AWS Serverless AWS Amplify


(Windows, macOS, Linux PowerShell Application Model
or Unix) (Windows, macOS, Linux) (AWS SAM) Local

AWS Command Line Interface user guide, Installing the AWS CLI

28

When you use the command line, you can use various tools to call AWS services:
• AWS Command Line Interface (AWS CLI) is an open source tool that enables
you to interact with AWS services by using commands in your command line
interface. With minimal configuration, you can start using the command
prompt in your favorite terminal program to access functionality that’s
equivalent to the AWS Management Console. For information on the AWS
CLI, see “AWS Command Line Interface” at https://aws.amazon.com/cli/.
• AWS Tools for PowerShell offers the AWS Tools for Windows PowerShell and
AWS Tools for PowerShell Core. They are PowerShell modules that are built
on the functionality that’s exposed by the SDK for .NET. The AWS PowerShell
Tools enable you to script operations on your AWS resources from the
PowerShell command line. For more information, see “AWS Tools for
PowerShell User Guide” at
https://docs.aws.amazon.com/powershell/latest/userguide/pstools-
welcome.html.
• AWS Serverless Application Model (AWS SAM) Local is an AWS CLI tool for the
local development and testing of serverless applications. For information
about AWS SAM Local, see “aws-sam-cli GitHub repository” at
https://github.com/awslabs/aws-sam-cli.
• AWS Amplify enables you to create, configure, and implement scalable
mobile applications that are powered by AWS. AWS Amplify provisions and
manages your mobile backend. It also provides a simple framework so that
you can integrate your backend with your frontends, including iOS, Android,
web, and React Native. AWS Amplify also automates the application release
process of both your frontend and your backend, enabling you to deliver
features faster. For more information, see “AWS Amplify” at
https://aws.amazon.com/amplify/.

For more information, see:

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 33
AWS Training and Certification Module 2: Introduction to Developing on AWS

• AWS command line tools – https://aws.amazon.com/tools/.


• How to get started with the AWS CLI – https://aws.amazon.com/cli/.
• How to install the AWS CLI – https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-
install.html.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 34
AWS Training and Certification Module 2: Introduction to Developing on AWS

Demonstration:
Installing the
AWS CLI

29

Now, the educator might choose to demonstrate installing the AWS CLI.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 35
AWS Training and Certification Module 2: Introduction to Developing on AWS

AWS CLI: Command line format

AWS CLI

Service Operation
Parameters
(command) (sub-command)

$ aws ec2 stop-instances -–instance-id i-1234567890abcdef0

$ aws ec2 run-instances –-cli-input-json file://./lcf/webserver.json

$ aws help
$ aws ec2 help
$ aws ec2 describe-instances help
30

Calls made from the AWS CLI have a certain format:


• The command line always begins with aws. This string is how you invoke the AWS
CLI.
• The next component is a service command. This string is the top-level AWS service
that you are calling (for example, Amazon EC2). For a list of currently supported
services, see “Available services” at
https://docs.aws.amazon.com/cli/latest/reference/#available-services.
• The operation subcommand is next. This string is the operation that you want to
perform on that service. This example uses the run-instances subcommand to
request the creation of a new EC2 instance.
• Then, you specify any parameters. The parameters are any arguments that are
needed to perform the operation. Argument names are preceded by two dashes (--).
For example, to create an EC2 instance, you must run the Amazon EC2 run-instances
operation and pass in several parameters, such as the Amazon Machine Image (AMI)
ID.
• You can also specify options. The options are choices that you can specify when you
run an operation. For example, you can use the --query option to limit the response
text so that it returns only the instance ID of your new instance.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 36
AWS Training and Certification Module 2: Introduction to Developing on AWS

AWS CloudShell

AWS CloudShell

AWS CloudShell provides CLI access in a web browser


• Available in the AWS Management Console
• Pre-authenticated session
• Pre-installed with the AWS CLI, SDKs, and other tools
• No cost
• 1 GB of storage per Region
31

Some of the features of AWS CloudShell include:


• CloudShell inherits your credentials from the AWS Management Console.
This means there are not key files to manage when using the AWS CLI.
• It runs on an Amazon Linux 2 instance that’s fully managed. All the latest
versions of the tools are installed without needing to update or patch the
environment
• It incurs no cost. CloudShell includes 1 GB of persistent storage per Region.
You only pay for the resources that you create and run on AWS.
• It’s customizable (per Region) for storing scripts, files, configuration
preferences, and tools.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 37
AWS Training and Certification Module 2: Introduction to Developing on AWS

Section 4: Fundamentals of working


with the AWS SDKs
Module 2: Introduction to Developing on AWS

32

Section 4: Fundamentals of working with AWS SDKs.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 38
AWS Training and Certification Module 2: Introduction to Developing on AWS

AWS SDKs
AWS SDK for: AWS Mobile SDK AWS IoT Device
• C++ for: SDK for:
• Go • Android • Arduino Yún
• Java • iOS • C++
• JavaScript in the • .NET and Xamarin • Embedded C
browser • Unity • Java
• JavaScript in • JavaScript
Node.js
• Python
• .NET and Xamarin
• PHP
• Python (Boto3)
• Ruby

33

The AWS SDKs are available in various programming languages and technology
platforms. You can use the AWS SDKs to call AWS services from your application
code.

Say, for example, that you are developing a music-sharing application. Your
application needs to upload a user’s music files to an S3 bucket. In this case,
your application could use the AWS SDK to programmatically upload files to the
S3 bucket.

To learn more about the available AWS SDKs (including installation instructions),
see:
• “SDKs” at https://aws.amazon.com/tools/.
• “AWS SDKs and Tools Reference Guide” at
https://docs.aws.amazon.com/sdkref/latest/guide/overview.html?icmpid=do
cs_homepage_sdktoolkits.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 39
AWS Training and Certification Module 2: Introduction to Developing on AWS

Overview of developing applications with AWS SDKs

Endpoint:
URL that’s an
entry point for a
web service

34

~alt text group28: Steps for developing with AWS SDKs, described in notes.

When you develop applications on AWS, you can use the AWS SDKs to make API
calls to AWS services and get responses back from those services. This diagram
illustrates application development with the AWS SDKs.

1. You write an application using an AWS SDK in your language of choice.


2. Each AWS SDK provides one or more APIs for working with AWS services.
3. The AWS SDK constructs an HTTP(S) request for use with the service API, and
sends the request to the AWS service endpoint.
4. The service performs the request and sends a response.
5. The AWS SDK processes the response and propagates it back to your
application.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 40
AWS Training and Certification Module 2: Introduction to Developing on AWS

Service client API


• Has one method per service operation
• Has objects for request and result data
• Example (in Python):

# List Objects in bucket using the client API


# Return type: dict / additional API calls needed to get objects
def listClient():
s3client = boto3.client('s3’)
response = s3client.list_objects_v2(Bucket=‘DOC-EXAMPLE-BUCKET')
for content in response['Contents']:
print(content['Key'],content['LastModified'])
return

35

AWS SDKs offer two levels of APIs that you can use to call AWS services: service
client APIs and resource APIs.

Service client API

AWS SDKs provide a set of client classes. Each client class exposes a direct
mapping of the API for the AWS service. These client objects have a method for
each operation that the service supports, with corresponding objects that
represent the request parameters and the response data. Using this low-level
client API gives you full control over the requests that you make to the service,
which enables you to tightly control the behavior and performance of your calls
to AWS services.

For example, both the SDK for Java and the SDK for .NET and Xamarin have
Amazon<Service>Client classes that correspond to each service, such as
AmazonS3Client and AmazonDynamoDBClient.

This example compares how to list the objects in the DOC-EXAMPLE-BUCKET S3


bucket by using the SDK for Python service client API.

For more information, see “S3: Client” at


https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services
/s3.html#client of the SDK for Python documentation.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 41
AWS Training and Certification Module 2: Introduction to Developing on AWS

Resource API
• Has one class per conceptual resource
• Defines service resources and individual resources
• Example (in Python):
# List Objects in Bucket using the Resource API
# Resources represent an object-oriented interface to Amazon Web Services (AWS).
# They provide a higher-level abstraction than the raw, low-level calls made by
# service clients
def listResource():
s3resource = boto3.resource('s3')
bucket = s3resource.Bucket(‘DOC-EXAMPLE-BUCKET')
for object in bucket.objects.all():
print(object.key, object.last_modified)
return

36

Some AWS SDKs, such as the AWS SDK for Python (Boto3), provide higher-level
APIs that are called resource APIs. Resource APIs provide a higher-level
abstraction than the low-level calls that are made by clients. Instead of a single
client object exposing the entire API for a service, the resource APIs consist of
classes that represent each of the conceptual resources that you interact with
when you use a service. These classes expose methods to retrieve data about
the resource, invoke actions that can be taken on the resource, and retrieve links
to other related resources. Access to the resources are then provided through
objects and collections. Resources include service such as Amazon S3 or Amazon
Simple Queue Service.

For example, the Amazon S3 service resource exposes methods to perform


actions on the Amazon S3 service. An individual Amazon S3 resource (such as an
object) has an identifier or object key, and attributes (such as last_modified).

This example compares how to list the objects in the DOC-EXAMPLE-BUCKET S3


bucket by using the resource API for the SDK for Python.

For more information about resource APIs, see in the SDK for Python for
documentation:
• “Resources” at
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources
.html.
• “Service Resource” at
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/servi
ces/s3.html#service-resource.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 42
AWS Training and Certification Module 2: Introduction to Developing on AWS

Specifying AWS Regions

Specify Region when you dynamodb_client =


instantiate the boto3.client(‘dynamodb’,
service client. region_name=‘us-east-1’)

~/.aws/config
Default Region is specified [default]
in AWS config. region=us-west-2
output=json

37

The AWS Cloud infrastructure is built around Regions and Availability Zones. A
Region is a physical location in the world that has multiple Availability Zones.
When you write you applications, you can access AWS services that physically
reside in a specific geographic region. How you specify the AWS Region depends
on the AWS SDK that you use.

With some AWS SDKs, such as the AWS SDKs for Java and .NET, you can specify
the Region when you instantiate the service client. You must create a separate
instance of the service client for each Region that you want to work with. For
other SDKs, such as the AWS SDK for Python (Boto3), you can use the default
Region that is set in the ~/.aws/config file.

For more information about specifying AWS Regions with the AWS SDKs, see:
• “Developer Guide – AWS SDK for Java 2.x” at
https://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-
dg-region-selection.html.
• “Configure the AWS Region” SDKs for .NET and Xamarin at
https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-
region-selection.html.
• “Configuration” for the SDKs for Python at
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstar
t.html#configuration.
• “Setting the AWS Region” SDK for JavaScript at
https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-
region.html.
• “Configure the AWS SDK for Ruby” at https://docs.aws.amazon.com/sdk-for-
ruby/v3/developer-guide/setup-config.html.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 43
AWS Training and Certification Module 2: Introduction to Developing on AWS

Handling exceptions
What to do?
Error response example • HTTP 400 series (client error):
handle error in application
<?xml version="1.0" encoding="UTF-8"?> • HTTP 500 series (server error):
<Error> retry operation
<Code>NoSuchKey</Code>
<Message>The resource you requested does not exist</Message>
<Resource>/DOC-EXAMPLE-BUCKET/myfoto.jpg</Resource>
<RequestId>4442587FB7D0A2F9</RequestId>
</Error>

Error response element descriptions


Error: Container Code: String that Message: Generic Resource: The RequestID: ID of
for all error uniquely identifies description of the resource that’s the request that’s
elements. an error condition. error code in involved in the associated with the
English. error. error.

38

When an API call is made to an AWS service, the service performs the request
and returns a response that includes an HTTP status code. If the request is
successful, the AWS service returns an HTTP 200 response code. If the request is
unsuccessful, the AWS service returns an error response, which consists of the
following elements:
• Error – Container for all error elements.
• Code – String that uniquely identifies an error condition. It’s meant to be read
and understood by programs that detect and handle errors by type.
• Message – Generic description of the error condition in English. It’s intended
for a human audience.
• Resource – Resource that’s involved in the error.
• RequestID – ID of the request that’s associated with the error.

You can use the error code to determine how to handle the error.

• A 400 series error means that you must handle the error in your application.
For example, Amazon S3 will return a 404 error code if the bucket you are
trying to access doesn’t exist. Your application can handle this error by first
creating the bucket, and then performing operations on it.
• A 500 series error indicates an internal server error. In this case, you could
retry the operation. Each AWS SDK implements automatic retry logic. You can
configure the maximum number of retry attempts. In addition to simple
retries, each AWS SDK implements an exponential backoff algorithm to retry
after failed connection attempts. With an exponential backoff algorithm, you
specify progressively longer waits after each failed attempt before retrying
your request.

For more information, see:

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 44
AWS Training and Certification Module 2: Introduction to Developing on AWS

• Error Handling section of the Developer Guide for specific AWS services
• “Retry behavior” at https://docs.aws.amazon.com/general/latest/gr/api-retries.html.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 45
AWS Training and Certification Module 2: Introduction to Developing on AWS

Exceptions

SDK for Java SDK for Python SDK for JavaScript


SDK for .NET and Xamarin
AmazonServiceException Botocore.exceptions.ClientError Asynchronous callback
(or subclass) function(error, data) { ... }
AmazonClientException

39

AWS SDKs throw exceptions to communicate errors in different ways.

SDK for Java


The AWS SDK for Java throws the following unchecked (runtime) exceptions
when errors occur:
• AmazonServiceException (and subclasses) – Indicates that the request was
correctly transmitted to the service. However, the service couldn’t process it,
and it returned an error response instead. The exception has the following
information that you can use to determine how your application should
handle the error:
• HTTP status code returned by the service, such as 404 Not Found
• AWS error code returned by the service, such as NoSuchBucket
• Detailed error message from the service, such as The specified bucket
does not exist
• AWS request ID for the failed request
• AmazonClientException – Indicates that a problem occurred inside the Java
client code. The problem might have occurred either while trying to send a
request to AWS or while trying to parse a response from AWS. For example,
the SDK for Java will throw an AmazonClientException if no network
connection is available when you try to call an operation on one of the
clients.
• java.lang.IllegalArgumentException – This exception is thrown if you pass an
illegal argument when you perform an operation on a service.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 46
AWS Training and Certification Module 2: Introduction to Developing on AWS

For more information, see “Developer Guide - AWS SDK for Java 2.x” at
https://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuide/java-dg-region-
selection.html.

SDK for .NET and Xamarin


The SDK for .NET and Xamarin throws Amazon.Runtime.AmazonServiceException and
Amazon.Runtime.AmazonClientException, which are similar to the errors from the SDK for
Java.

SDK for Python


The SDK for Python throws botocore.exceptions.ClientError.

SDK for JavaScript


Each service method that sends a request can accept a callback as the last parameter with
the signature function(error, data) { ... }. This callback is called when the response or error
data is available.

For more information, see “Calling Services Asynchronously” at


https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/calling-services-
asynchronously.html in the SDK for JavaScript Developer Guide.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 47
AWS Training and Certification Module 2: Introduction to Developing on AWS

Lab 2.1:
Exploring AWS
CloudShell and the
AWS Cloud9 IDE

40

You will now complete Lab 2.1: Exploring AWS CloudShell and the AWS Cloud9
IDE

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 48
AWS Training and Certification Module 2: Introduction to Developing on AWS

Lab: Tasks
1. Exploring AWS CloudShell
2. Creating an AWS Cloud9 instance
3. Exploring the AWS Cloud9 integrated development environment
(IDE)
4. Using Amazon CodeWhisperer to generate a Python script

41

In this lab, you will complete the following tasks:


1. Exploring AWS CloudShell
2. Creating an AWS Cloud9 instance
3. Exploring the AWS Cloud9 integrated development environment (IDE)
4. Using Amazon CodeWhisperer to generate a Python script

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 49
AWS Training and Certification Module 2: Introduction to Developing on AWS

Lab: Final product

42

The diagram summarizes what you will have done after you complete the lab.
You will have used the AWS Management Console, AWS CloudShell, AWS Cloud9
and Amazon CodeWhisperer to interact with an Amazon S3 bucket.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 50
AWS Training and Certification Module 2: Introduction to Developing on AWS

~ 60 minutes

Begin Lab 2.1:


Exploring AWS
CloudShell and
the AWS Cloud9
IDE
43

It is now time to start the lab.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 51
AWS Training and Certification Module 2: Introduction to Developing on AWS

Lab debrief:
Key takeaways

44

Your educator might choose to lead a conversation about the key takeaways
from this lab after you have completed it.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 52
AWS Training and Certification Module 2: Introduction to Developing on AWS

Module wrap-up
Module 2: Introduction to Developing on AWS

45

It’s now time to review the module and wrap up with a knowledge check.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 53
AWS Training and Certification Module 2: Introduction to Developing on AWS

Module summary
In this module, you learned how to do the following:
• Recognize the systems development lifecycle (SDLC).
• Describe how to start developing on AWS.
• Identify the benefits of using the AWS Cloud9 integrated development
environment (IDE).
• Identify the benefits of using Amazon CodeWhisperer with AWS Cloud9.
• Develop and run a simple program using AWS Cloud9 and Amazon
CodeWhisperer.
• Indicate how to use AWS SDKs.

46

In summary, in this module, you learned how to:


• Recognize the systems development lifecycle (SDLC).
• Describe how to start developing on AWS.
• Indicate how to use AWS SDKs.
• Identify the benefits of using AWS Cloud9 integrated development
environment (IDE).
• Identify the benefits of using Amazon CodeWhisperer with AWS Cloud9.
• Develop and run a simple program using AWS Cloud9 and Amazon
CodeWhisperer.

To finish this module, complete the corresponding knowledge check.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 54
AWS Training and Certification Module 2: Introduction to Developing on AWS

Complete the knowledge check

47

It is now time to complete the knowledge check for this module.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 55
AWS Training and Certification Module 2: Introduction to Developing on AWS

Sample exam question


A new developer needs an integrated development environment (IDE) to write and update code for
their application. Their technical lead moves between locations and must be able to review their code
and leave comments in real time from any computer that they have access to.

Which method is the simplest way to meet this use case?

Identify the key words and phrases before continuing.

The following are the key words and phrases:

• Integrated development environment (IDE)

• Review their code and leave comments in real time from any computer that they have access to

48

It is important to fully understand the scenario and question being asked before even
reading the answer choices. Find the keywords in this scenario and question that will
help you find the correct answer.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 56
AWS Training and Certification Module 2: Introduction to Developing on AWS

Sample exam question: Response choices


A new developer needs an integrated development environment (IDE) to write and update code for
their application. Their technical lead moves between locations and must be able to review their code
and leave comments in real time from any computer that they have access to.

Which method is the simplest way to meet this use case?

Choice Response
Connect to the AWS Management Console through a web browser, and use the AWS CLI to access and update the code
A
from both locations.

B Use an AWS CodeCommit repository to store the code, and keep local versions in sync on each computer.

C Configure an AWS Cloud9 environment running on an Amazon EC2 instance and connect to it through a web browser.

Configure an AWS Serverless Application Model (AWS SAM) environment, and use the AWS SDK to work with the
D
application code.

49

Now that we have bolded the keywords in this scenario, let us look at the answers.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 57
AWS Training and Certification Module 2: Introduction to Developing on AWS

Sample exam question: Answer


The correct answer is C.

Choice Response
Connect to the AWS Management Console through a web browser, and use the AWS CLI to access and update the code
A
from both locations.

B Use an AWS CodeCommit repository to store the code, and keep local versions in sync on each computer.

Configure an AWS Cloud9 environment running on an Amazon EC2 instance and connect to it through a web
C
browser.
Configure an AWS Serverless Application Model (AWS SAM) environment, and use the AWS SDK to work with the
D
application code.

50

The correct answer is C: Configure an AWS Cloud9 environment running on an


Amazon EC2 instance and connect to it through a web browser.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 58
AWS Training and Certification Module 2: Introduction to Developing on AWS

Additional resources
To learn more about the AWS SDK for Python used in this course:
• Developer guide – Boto3 documentation
• API documentation – Core references

To learn more about cloud development best practices:


• Well-Architected Framework, Appendix: Questions and Best Practices section

51

For all developer-related information, refer to the AWS Tools & SDKs link in the
Developer Tools section on the AWS Documentation page
(http://aws.amazon.com/documentation/).

For more information about the AWS SDKs, see:


• SDK for Java
• Developer guide
http://docs.aws.amazon.com/AWSSdkDocsJava/latest/DeveloperGuid
e/welcome.html.
• API documentation –
http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/index.html.

• SDK for .NET and Xamarin


• Developer guide – https://docs.aws.amazon.com/sdk-for-
net/v3/developer-guide/welcome.html.
• API documentation – https://docs.aws.amazon.com/sdk-for-
net/v3/developer-guide/welcome.html.

• SDK for Python


• Developer guide –
https://boto3.amazonaws.com/v1/documentation/api/latest/index.ht
ml.
• API documentation –
https://boto3.amazonaws.com/v1/documentation/api/latest/referenc
e/core/index.html.

To learn about cloud development best practices refer to the Well-Architected


Framework, Appendix: Questions and Best Practices section at

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 59
AWS Training and Certification Module 2: Introduction to Developing on AWS

https://docs.aws.amazon.com/wellarchitected/latest/framework/appendix.html.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 60
AWS Training and Certification Module 2: Introduction to Developing on AWS

Thank you

Corrections, feedback, or other questions?


Contact us at https://support.aws.amazon.com/#/contacts/aws-academy.

52

Thank you for completing this module.

© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 61

You might also like