boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
9.07k stars 1.87k forks source link

How to invoke an API gateway rest api endpoint with credentials #4247

Open pnmcgp opened 2 months ago

pnmcgp commented 2 months ago

Describe the issue

There is a ton of documentation on how create, modify, and protect a rest-api made with API Gateway but there doesn't seem to be any info on how to actually call an endpoint with the correct auth headers. I'd assume since I can do everything else in boto3 that this should be implemented somewhere but so far I have had no luck finding it.

Is there any existing documentation for invoking and api gateway endpoint with credentials?

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/apigateway.html#apigateway https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/apigatewayv2.html#apigatewayv2 https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sts.html#sts https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#iam https://boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html

tim-finnigan commented 2 months ago

Thanks for reaching out. Some places where this use case could potentially be documented:

There's also a related feature request here in which different approaches are discussed: https://github.com/boto/boto3/issues/1246