Module 2 - Introduction To Developing On AWS
Module 2 - Introduction To Developing On AWS
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
© 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
© 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
Knowledge check
4
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
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
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
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 10
AWS Training and Certification Module 2: Introduction to Developing on AWS
Enterprises must bridge the gap between the stability of their operations and
rapid feature development.
Reliably
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 11
AWS Training and Certification Module 2: Introduction to Developing on AWS
Train users
Test performance
Make adjustments
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.
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
• 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
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
12
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 16
AWS Training and Certification Module 2: Introduction to Developing on AWS
13
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
14
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 18
AWS Training and Certification Module 2: Introduction to Developing on AWS
• 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:
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 20
AWS Training and Certification Module 2: Introduction to Developing on AWS
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
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.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 22
AWS Training and Certification Module 2: Introduction to Developing on AWS
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
The AWS Cloud9 editor is the tool that you use to write code.
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
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
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
23
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.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 27
AWS Training and Certification Module 2: Introduction to Developing on AWS
24
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
25
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
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
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
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
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/.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 33
AWS Training and Certification Module 2: Introduction to Developing on AWS
© 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
Service Operation
Parameters
(command) (sub-command)
$ aws help
$ aws ec2 help
$ aws ec2 describe-instances help
30
© 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
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 37
AWS Training and Certification Module 2: Introduction to Developing on AWS
32
© 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
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.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 40
AWS Training and Certification Module 2: Introduction to Developing on AWS
35
AWS SDKs offer two levels of APIs that you can use to call AWS services: service
client APIs and resource APIs.
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.
© 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 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
~/.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>
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.
© 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
39
© 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.
© 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
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 49
AWS Training and Certification Module 2: Introduction to Developing on AWS
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
© 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
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 54
AWS Training and Certification Module 2: Introduction to Developing on AWS
47
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 55
AWS Training and Certification Module 2: Introduction to Developing on AWS
• 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
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
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
© 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
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/).
© 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
52
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. 61