0

Could someone tell me how to do the following.

I have created a Cloud Development Kit app which has an API Gateway and a Lambda function

I want to use aws-cdk-local package and Localstack to test this locally

I have installed everything correctly and I can deploy my CDK app to Localstack

How do I get the endpoint to test the APIGateway. The endpoints I see in the console after using cdklocal deploy are not correct Using something like http://localhost:4566/restapis/my-api-gateway-id/dev/ results in

<Error>
<Code>NoSuchBucket</Code>
<Message>The specified bucket does not exist</Message>
<BucketName>restapis</BucketName>
<RequestId>xxxxx-xxxx-xxxx-xxxx-6e8eEXAMPLE</RequestId>
</Error>

Any advice or comments on how to create the correct endpoint is most welcome.

1 Answer 1

-1

For anyone else it appears the url below works

http://localhost:4566/restapis/restapi-id/local/_user_request_/

points port 4566 is the port my localstack runs on.

Use

aws --endpoint-url=http://localhost:4566 apigateway get-rest-apis

To get the restapi id(s)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.