Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I want to create an http proxy using apigatewayv2 service, I have created the API, integration and route as follows:
export APIID=$(aws --profile localstack --endpoint-url https://localhost.localstack.cloud:4566 --region us-east-1 apigatewayv2 create-api --name testGatewayProxy --protocol-type HTTP --target "http://wsapi-gw:80" --query 'ApiId' --output text)
export INTEGRATIONID=$(aws --profile localstack --endpoint-url https://localhost.localstack.cloud:4566 --region us-east-1 apigatewayv2 create-integration --api-id $APIID --integration-type HTTP_PROXY --integration-uri "http://wsapi-gw:80" --integration-method ANY --payload-format-version "1.0" --query 'IntegrationId' --output text)
aws --profile localstack --endpoint-url https://localhost.localstack.cloud:4566 --region us-east-1 apigatewayv2 create-route --api-id $APIID --route-key "ANY /stolenid/breach/search" --target integrations/$INTEGRATIONID
aws --profile localstack --endpoint-url https://localhost.localstack.cloud:4566 --region us-east-1 apigatewayv2 create-stage --api-id $APIID --stage-name proxy --auto-deploy
The issue is that my route is not being forwarded to the backend service. It doesn't matter whether I use an specific route or the /{proxy+} route. I tried adding
Expected Behavior
the api call path must be forwarded to the backend call.
How are you starting LocalStack?
With a docker-compose file
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack
command, arguments, or docker-compose.yml
)
docker run localstack/localstack
Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
export APIID=$(aws --profile localstack --endpoint-url https://localhost.localstack.cloud:4566 --region us-east-1 apigatewayv2 create-api --name testGatewayProxy --protocol-type HTTP --target "http://wsapi-gw:80" --query 'ApiId' --output text)
export INTEGRATIONID=$(aws --profile localstack --endpoint-url https://localhost.localstack.cloud:4566 --region us-east-1 apigatewayv2 create-integration --api-id $APIID --integration-type HTTP_PROXY --integration-uri "http://wsapi-gw:80" --integration-method ANY --payload-format-version "1.0" --query 'IntegrationId' --output text)
aws --profile localstack --endpoint-url https://localhost.localstack.cloud:4566 --region us-east-1 apigatewayv2 create-route --api-id $APIID --route-key "ANY /stolenid/breach/search" --target integrations/$INTEGRATIONID
aws --profile localstack --endpoint-url https://localhost.localstack.cloud:4566 --region us-east-1 apigatewayv2 create-stage --api-id $APIID --stage-name proxy --auto-deploy
Environment
- OS: Ubuntu
- LocalStack:pro
LocalStack version: 4.4.0
LocalStack Docker image sha:
LocalStack build date: 2025-05-08
LocalStack build git hash: b0d9b9da1
Anything else?
No response