Skip to main content

AWS API Gateway Client Lib for IAM Authorized APIs

Project description

AWS API Gateway IAM Authorizer Client

This provides a simple base class for AWS API Gateway clients to provide AWS V4 request signing for http requests when working against APIs using IAM Authorization.

Usage

Assuming the rest api endpoint

from apigw_iam_client import Client

class MyApi(Client):

   def list_oranges(self, store_id='all'):
       return self.get("%s/oranges" % store_id).json()
>> client = MyApi('bhttps://foix.execute-api.us-east-1.amazonaws.com/dev/')
>> client.list_oranges()
{'version': '0.1.0', 'oranges': []}

The client also supports obtaining credentials via STS Role Assume to access the underlying api, by passing a role arn and optional session_name.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apigw_iam_client-0.1.tar.gz (2.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page