You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ With [pip](https://pip.pypa.io/en/latest/index.html) installed, run: ``pip insta
51
51
52
52
## Connect
53
53
54
-
***AWS Developers Slack**: `#lambda-powertools`**
54
+
***AWS Developers Slack**: `#lambda-powertools`** - **[Invite, if you don't have an account](https://join.slack.com/t/awsdevelopers/shared_invite/zt-gu30gquv-EhwIYq3kHhhysaZ2aIX7ew)**
*[AWS Credentials to your AWS Account](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-set-up-credentials.html) configured.
7
11
8
12
## Getting started
9
-
With [SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) installed, let's clone our sample project before we add one feature at a time.
13
+
Let's clone our sample project before we add one feature at a time.
10
14
11
15
???+ tip "Tip: Want to skip to the final project?"
12
16
Bootstrap directly via SAM CLI: `sam init --location https://github.com/aws-samples/cookiecutter-aws-sam-python`
13
17
=== "shell"
14
18
```bash
15
19
sam init --runtime python3.9 --dependency-manager pip --app-template hello-world --name powertools-quickstart
16
20
```
17
-
If you want to play with the final code, then you can download it from [aws-samples](https://github.com/aws-samples/cookiecutter-aws-sam-python) github repository.
18
-
=== "shell"
19
-
```bash
20
-
sam init --location https://github.com/aws-samples/cookiecutter-aws-sam-python
21
-
```
22
-
### Configuration
23
-
If you deploy code from Quickstart make sure to [set up your AWS credentials](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-getting-started-set-up-credentials.html).
24
21
25
22
### Code example
26
23
Within the `powertools-quickstart` folder, we will modify the following files:
@@ -266,7 +263,7 @@ The simple code might look similar to the following code snippet.
266
263
267
264
* We add two methods: `hello_name` and `hello` (line 1-7).
268
265
* We add the `Router` class which allows us to record the method that should be called when the specific request arrives (line 10-23).
269
-
* We creat the instance and added the configuration with the mapping of the processing methods and the http query method (line 26-28).
266
+
* We create the instance and added the configuration with the mapping of the processing methods and the http query method (line 26-28).
270
267
* In the lambda handler, we call router instance `get` method to retrieve a reference to the processing method (`hello` or `hello_name`) that will process the query (line 34).
271
268
* Finally, we run this method and send the results back to API Gateway (line 35).
0 commit comments