Skip to content

Commit 740591d

Browse files
committed
add authentication details to the example
1 parent d17c747 commit 740591d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Examples/quoteapi/README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,7 @@ The **sam deploy** command creates the Lambda function and API Gateway in your A
2828
sam deploy --guided
2929
```
3030

31-
Accept the default response to every prompt, except the following warning:
32-
33-
```bash
34-
QuoteService may not have authorization defined, Is this okay? [y/N]: y
35-
```
36-
37-
The project creates a publicly accessible API endpoint. This is a warning to inform you the API does not have authorization. If you are interested in adding authorization to the API, please refer to the [SAM Documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-httpapi.html).
31+
The project creates an API endpoint protected by a bearer token authorization. Use token value '123' while testing. Youc an change the token validation logic in the `LambdaAuthorizer` function. To learn more about Lambda authorizer function, refer to [the API Gateway documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html).
3832

3933
## Use the API
4034

@@ -54,7 +48,7 @@ Use cURL or a tool such as [Postman](https://www.postman.com/) to interact with
5448
**Invoke the API Endpoint**
5549

5650
```bash
57-
curl https://[your-api-endpoint]/stocks/AMZN
51+
curl -H 'Authorization: Bearer 123' https://[your-api-endpoint]/stocks/AMZN
5852
```
5953

6054
## Test the API Locally

0 commit comments

Comments
 (0)