Skip to content

Commit a1a68c4

Browse files
authored
Update README.md
1 parent c12ea00 commit a1a68c4

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

apigw-rest-api-lambda-python/README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The AWS Toolkit is an open source plug-in for popular IDEs that uses the AWS SAM
2525

2626
## Deploy the sample application
2727

28-
The Serverless Application Model Command Line Interface (SAM CLI) is an extension of the AWS CLI that adds functionality for building and testing Lambda applications. It uses Docker to run your functions in an Amazon Linux environment that matches Lambda. It can also emulate your application's build environment and API.
28+
The AWS Serverless Application Model Command Line Interface (AWS SAM CLI) is a framework for building and testing Lambda applications. It uses Docker to run your functions in an Amazon Linux environment that matches Lambda. It can also emulate your application's build environment and API.
2929

3030
To use the AWS SAM CLI, you need the following tools.
3131

@@ -38,9 +38,9 @@ To use the AWS SAM CLI, you need the following tools.
3838
To build and deploy your application for the first time, run the following in your shell:
3939

4040
```bash
41-
$ cd apigw-rest-api-lambda-python
42-
$ sam build --use-container
43-
$ sam deploy --guided
41+
cd apigw-rest-api-lambda-python
42+
sam build --use-container
43+
sam deploy --guided
4444
```
4545

4646
The first command will build the source of your application. The second command will package and deploy your application to AWS, with a series of prompts:
@@ -54,26 +54,26 @@ The first command will build the source of your application. The second command
5454

5555
You can find your API Gateway Endpoint URL in the output values displayed after deployment.
5656

57-
## Use the AWS SAM CLI to test locally
57+
## Use AWS SAM CLI to test locally
5858

59-
The SAM CLI installs dependencies defined in `hello_world/package.json`, creates a deployment package, and saves it in the `.aws-sam/build` folder.
59+
The AWS SAM CLI installs dependencies defined in `hello_world/package.json`, creates a deployment package, and saves it in the `.aws-sam/build` folder.
6060

61-
Ypu can test a single function by invoking it directly with a test event. An event is a JSON document that represents the input that the function receives from the event source. Test events are included in the `events` folder in this project.
61+
You can test a single function by invoking it directly with a test event. An event is a JSON document that represents the input that the function receives from the event source. Test events are included in the `events` folder in this project.
6262

6363
Run functions locally and invoke them with the `sam local invoke` command.
6464

6565
```bash
66-
$ sam local invoke HelloWorldFunction --event events/event.json
66+
sam local invoke HelloWorldFunction --event events/event.json
6767
```
6868

69-
The AWS SAM CLI can also emulate your application's API. Use the `sam local start-api` to run the API locally on port 3000.
69+
AWS SAM CLI can also emulate your application's API. Use the `sam local start-api` to run the API locally on port 3000.
7070

7171
```bash
72-
$ sam local start-api
73-
$ curl http://localhost:3000/
72+
sam local start-api
73+
curl http://localhost:3000/
7474
```
7575

76-
The AWS SAM CLI reads the application template to determine the API's routes and the functions they invoke. The `Events` property on each function's definition includes the route and method for each path.
76+
AWS SAM CLI reads the application template to determine the API's routes and the functions they invoke. The `Events` property on each function's definition includes the route and method for each path.
7777

7878
```yaml
7979
Events:
@@ -84,13 +84,13 @@ The AWS SAM CLI reads the application template to determine the API's routes and
8484
Method: get
8585
```
8686
87-
## Use the AWS SAM CLI to test remotely
87+
## Use AWS SAM CLI to test remotely
8888
After you have deployed your application, you can remotely invoke your Lambda function to test it in the cloud.
8989
9090
Invoke functions remotely with the `sam remote invoke` command.
9191

9292
```bash
93-
$ sam remote invoke HelloWorldFunction --event-file events/event.json
93+
sam remote invoke HelloWorldFunction --event-file events/event.json
9494
```
9595

9696
You can also go to the API Gateway endpoint URL that was output after the deployment of your application, which will similarly invoke your deployed Lambda function.
@@ -106,7 +106,6 @@ $ sam logs -n HelloWorldFunction --stack-name "YOUR_STACK_NAME_HERE" --tail
106106

107107
You can find more information and examples about filtering Lambda function logs in the [AWS SAM CLI Documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-logging.html).
108108

109-
110109
## Cleanup
111110

112111
To delete the sample application that you created, use the AWS CLI. Assuming you used your project name for the stack name, you can run the following:
@@ -117,4 +116,4 @@ $ sam delete
117116

118117
## Resources
119118

120-
See the [AWS SAM developer guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html) for an introduction to SAM specification, the SAM CLI, and serverless application concepts.
119+
See the [AWS SAM developer guide](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html) for an introduction to AWS SAM specification, the AWS SAM CLI, and serverless application concepts.

0 commit comments

Comments
 (0)