Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update APIGW URL contruction to use stageName #1604

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ $ export rest_api_id=$(cd terraform; tflocal output --raw rest_api_id)
The endpoint for the API Gateway is constructed similarly to the one on AWS:

**`
https://<apiId>.execute-api.localhost.localstack.cloud:4566/<stageId>/<path>
https://<apiId>.execute-api.localhost.localstack.cloud:4566/<stageName>/<path>
`**

So adding two products to the database is straightforward using `curl`:
Expand Down
6 changes: 3 additions & 3 deletions content/en/user-guide/aws/apigateway/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ There are two alternative URL formats to access these endpoints.
The recommended URL format for accessing APIs is to use the following URL syntax with an `execute-api` hostname:

```shell
http://<apiId>.execute-api.localhost.localstack.cloud:4566/<stageId>/<path>
http://<apiId>.execute-api.localhost.localstack.cloud:4566/<stageName>/<path>
```

Here's an example of how you would access the HTTP/REST API with an ID of `0v1p6q6`:
Expand All @@ -310,7 +310,7 @@ http://0v1p6q6.execute-api.localhost.localstack.cloud:4566/my/path1
The alternative URL format is an endpoint with the predefined base path `/_aws/execute-api`:

```shell
http://localhost:4566/_aws/execute-api/<apiId>/<stageId>/<path>
http://localhost:4566/_aws/execute-api/<apiId>/<stageName>/<path>
```

For the example above, the URL would be:
Expand All @@ -326,7 +326,7 @@ This format is sometimes used in case of local DNS issues.
If you are using LocalStack 4.0, the following `_user_request_` format is deprecated, and you should use the format above.

```shell
http://localhost:4566/restapis/<apiId>/<stageId>/_user_request_/<path>
http://localhost:4566/restapis/<apiId>/<stageName>/_user_request_/<path>
```

{{< / callout >}}
Expand Down
Loading