Skip to content

Commit 619417d

Browse files
authored
Merge pull request #1296 from madeline-underwood/AWS-SAM-CLI
AWS_SAM_CLI_Editorial checks_NS to review
2 parents 7e8644c + 19ec29e commit 619417d

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

content/install-guides/aws-sam-cli.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ tool_install: true
1818
weight: 1
1919
---
2020

21-
The AWS Serverless Application Model (SAM) CLI is an open-source command-line tool that you can use to build, test, and deploy serverless applications. The SAM CLI provides a Lambda-like execution environment that lets you locally build, test and debug applications defined by AWS SAM templates.
22-
23-
It is available for a variety of operating systems and Linux distributions and supports the Arm architecture.
21+
The Amazon Web Services (AWS) Serverless Application Model (SAM) CLI is an open-source command-line tool that you can use to build, test, and deploy serverless applications. The SAM CLI provides a Lambda-like execution environment that lets you locally build, test and debug applications defined by AWS SAM templates. It is available for a variety of operating systems and Linux distributions, and supports the Arm architecture.
2422

2523
## Before you begin
2624

@@ -38,9 +36,9 @@ The output should be:
3836
aarch64
3937
```
4038

41-
If you see a different result, you are not using an Arm computer running 64-bit Linux.
39+
If you see a different result, you are not using an Arm-based computer running 64-bit Linux.
4240

43-
Running the AWS SAM CLI requires Docker. Refer to the [Docker](/install-guides/docker/) install guide for installation instructions. Confirm Docker is running before installing the SAM CLI.
41+
Running the AWS SAM CLI requires Docker. Refer to the [Docker](/install-guides/docker/) Install Guide for installation instructions. Confirm Docker is running before installing the SAM CLI.
4442

4543
Python and Python pip are also required to run the SAM CLI example.
4644

@@ -52,21 +50,22 @@ sudo apt install python-is-python3 python3-pip -y
5250

5351
## Download and install the AWS SAM CLI
5452

55-
There are two options to install the SAM CLI, from a zip file or using the Python `pip` command. Select your preferred method.
53+
There are two options to install the SAM CLI, you can select your preferred method:
54+
55+
* From a zip file.
56+
* Using the Python `pip` command.
5657

57-
### Install from zip file
58+
### Download and install from zip file
5859

59-
Use `wget` to download and install:
60+
Use `wget`:
6061

6162
```bash
6263
wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-arm64.zip
6364
unzip aws-sam-cli-linux-arm64.zip -d sam-install
6465
sudo ./sam-install/install
6566
```
6667

67-
### Install using Python pip
68-
69-
Install the SAM CLI using `pip`:
68+
### Install the SAM CLI using Python pip
7069

7170
```
7271
sudo apt install python3-venv -y
@@ -75,31 +74,31 @@ source .venv/bin/activate
7574
pip install aws-sam-cli
7675
```
7776

78-
### Confirm the SAM CLI is installed:
77+
### Confirm that the SAM CLI has been installed
7978

8079
```bash
8180
sam --version
8281
```
8382

84-
The version should be printed:
83+
The version should be printed on screen:
8584

8685
```output
8786
SAM CLI, version 1.125.0
8887
```
8988

9089
## Example application
9190

92-
Use the AWS SAM CLI to build and deploy a simple "Hello World" serverless application which includes the line `uname -m` to check the platform it is running on.
91+
You can use the AWS SAM CLI to build and deploy a simple "Hello World" serverless application that includes the line `uname -m` to check the platform it is running on, by following these steps.
9392

9493
1. Create the project
9594

96-
Adjust the runtime argument if you have a different version of Python.
95+
Use the code below, adjusting the runtime argument if you have a different version of Python:
9796

9897
```console
9998
sam init --runtime python3.12 --architecture arm64 --dependency-manager pip --app-template hello-world --name uname-app --no-interactive
10099
```
101100

102-
2. Change to the new directory
101+
2. Change to the new directory:
103102

104103
```console
105104
cd uname-app
@@ -146,7 +145,7 @@ def lambda_handler(event, context):
146145
}
147146
```
148147

149-
4. Build the application
148+
4. Build the application:
150149

151150
```console
152151
sam build
@@ -158,7 +157,7 @@ sam build
158157
sam local invoke "HelloWorldFunction" -e events/event.json
159158
```
160159

161-
The output below shows the results from the command `uname -m` and the value of `aarch64` confirms an Arm Linux computer.
160+
The output below shows the results from the command `uname -m` and the value of `aarch64` confirms an Arm Linux computer:
162161

163162
```output
164163
Invoking app.lambda_handler (python3.12)

0 commit comments

Comments
 (0)