Skip to content

Commit

Permalink
Rename EventTimeoutInMillis
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorbonas committed May 15, 2024
1 parent 9da1893 commit 504988a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions serverless/DEVELOPER_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ When deploying your connector using one-click deployment the following parameter
- LogLevel
- MemorySize
- ReadThrottlingBurstLimit
- EventTimeoutInMillis
- ApiGatewayTimeoutInMillis
- LambdaTimeoutInSeconds
- WriteThrottlingBurstLimit

Expand Down Expand Up @@ -99,7 +99,7 @@ The steps to deploy a template are as follows:
To override default parameter values use the `--parameter-overrides` argument and provide a string with format ParameterKey=ParameterValue. For example:

```shell
sam deploy --parameter-overrides "LambdaTimeoutInSeconds=50 EventTimeoutInMillis=60000 DefaultDatabase=<CustomDatabase>"
sam deploy --parameter-overrides "LambdaTimeoutInSeconds=50 ApiGatewayTimeoutInMillis=60000 DefaultDatabase=<CustomDatabase>"
```
You can view the full set of parameters defined for `serverless/template.yml` below, in [AWS Lambda Configuration Options](#aws-lambda-configuration-options).

Expand Down Expand Up @@ -214,7 +214,7 @@ Follow the verification steps in [README.md#verification](../README.md#verificat
| DefaultDatabase | The Prometheus label containing the database name. | PrometheusDatabase |
| DefaultTable | The Prometheus label containing the table name. | PrometheusMetricsTable |
| MemorySize | The memory size of the AWS Lambda function. | 512 |
| EventTimeoutInMillis | The maximum amount of time in milliseconds an API Gateway event will wait before timing out. | 30000 |
| ApiGatewayTimeoutInMillis | The maximum amount of time in milliseconds an API Gateway event will wait before timing out. | 30000 |
| LambdaTimeoutInSeconds | The amount of time in seconds to run the connector on AWS Lambda before timing out. | 30 |
| ReadThrottlingBurstLimit | The number of burst read requests per second that API Gateway permits. | 1200 |
| WriteThrottlingBurstLimit | The number of burst write requests per second that API Gateway permits. | 1200 |
Expand Down Expand Up @@ -643,13 +643,13 @@ See the list below for parameters whose values that may result in resource confl

### AWS Lambda Timeout or HTTP Status 404 Not Found

If the Lambda `EventTimeoutInMillis` parameter is too small or a PromQL query exceeds the `EventTimeoutInMillis` value a
If the Lambda `ApiGatewayTimeoutInMillis` parameter is too small or a PromQL query exceeds the `ApiGatewayTimeoutInMillis` value a

```shell
remote_read: remote server https://api-id.execute-api.region.amazonaws.com/dev/read returned HTTP status 404 Not Found: {"message":"Not Found"}
```

error could be returned. If you encounter this error first try overriding the default value for `EventTimeoutInMillis` (30 seconds) with a greater value using the [`--parameter-overrides` option for `sam deploy`](#aws-cli-deployment).
error could be returned. If you encounter this error first try overriding the default value for `ApiGatewayTimeoutInMillis` (30 seconds) with a greater value using the [`--parameter-overrides` option for `sam deploy`](#aws-cli-deployment).

### Task Timed Out Error

Expand Down
6 changes: 3 additions & 3 deletions serverless/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Parameters:
MinValue: 128
MaxValue: 8192
Description: "The memory size of Lambda function."
EventTimeoutInMillis:
ApiGatewayTimeoutInMillis:
Type: Number
MinValue: 2
Default: 30000
Expand Down Expand Up @@ -108,7 +108,7 @@ Resources:
ApiId: !Ref APIGateway
Method: POST
Path: /write
TimeoutInMillis: !Ref EventTimeoutInMillis
TimeoutInMillis: !Ref ApiGatewayTimeoutInMillis
RouteSettings:
ThrottlingBurstLimit: !Ref "WriteThrottlingBurstLimit"

Expand All @@ -118,7 +118,7 @@ Resources:
ApiId: !Ref APIGateway
Method: POST
Path: /read
TimeoutInMillis: !Ref EventTimeoutInMillis
TimeoutInMillis: !Ref ApiGatewayTimeoutInMillis
RouteSettings:
ThrottlingBurstLimit: !Ref "ReadThrottlingBurstLimit"

Expand Down

0 comments on commit 504988a

Please sign in to comment.