Skip to main content

Provides a botocore.session.Session implementation for accessing EchoStream Tenant resources

Project description

echostream-botocore

Provides a botocore.session.Session implementation for accessing EchoStream Tenant resources

This package provides two primary mechanisms to create a botocore.session.Session object in your EchoStream Tenant; ApiSession or AppSession. These session objects will automatically refresh both your Cognito credentials and your botocore credentials (using the EchoStream AppSync API).

Common parameters

Parameter ENV VAR Description Required
appsync_endpoint APPSYNC_ENDPOINT The EchoStream AppSync endpoint If cognito not provided
client_id CLIENT_ID The Cognito Client Id for the provided user_pool_id If cognito not provided
cognito N/A A pycognito.Cognito object If other parameters are not provided
duration N/A The length of time that the underlying credentials should be good for in seconds; shoudl be greater than 900 Defaults to 3600
password PASSWORD The password associated with username If cognito not provided
tenant TENANT The name of the EchoStream Tenant Yes
user_pool_id USER_POOL_ID The Cognito User Pool Id If cognito not provided
username USER_NAME The username of the ApiUser If cognito not provided

ApiSession

ApiSession objects are used to gain a Tenant-level botocore.session.Session in your Tenant using an EchoStream ApiUser.

ApiSessions may be created using a pycognito.Cognito instance or via a combination of environment variables and parameters. The environment variables or parameters are interchangeable. All parameters/environment variables are required if a Cognito object is not provided. If a Cognito object is provided, then all parameters/environment varaiables are ignored and it is assumed that the Cognito object references an ApiUser.

Usage (assuming correct ENV setup)

from boto3 import Session
from echostream_botocore import ApiSession

session = Session(
    botocore_session=ApiSession(),
    region_name="us-east-1"
)

ddb_client = session.client("dynamodb")
...

AppSession

AppSession objects are used to gain a App-level botocore.session.Session in your Tenant using an EchoStream AppUser.

AppSessions may be created using a pycognito.Cognito instance or via a combination of environment variables and parameters. The environment variables or parameters are interchangeable. All parameters/environment variables are required if a Cognito object is not provided. If a Cognito object is provided, then all parameters/environment varaiables are ignored and it is assumed that the Cognito object references an AppUser.

Additional Parameters

Parameter ENV VAR Description Required
app APP The name of the EchoStream App Yes

Usage (assuming correct ENV setup)

from boto3 import Session
from echostream_botocore import AppSession

session = Session(
    botocore_session=AppSession(),
    region_name="us-east-1"
)

ddb_client = session.client("dynamodb")
...

Project details


Download files

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

Source Distribution

echostream-botocore-0.0.1.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

echostream_botocore-0.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file echostream-botocore-0.0.1.tar.gz.

File metadata

  • Download URL: echostream-botocore-0.0.1.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for echostream-botocore-0.0.1.tar.gz
Algorithm Hash digest
SHA256 aa678d1f2bffbf2475733dd2758edc65868a11e5e00f21983e6fc5db323f1880
MD5 6ed2380494bbdefc2a521678f0915503
BLAKE2b-256 a586f004f03e4aef1f7ad38d4a17563de56955a509578f5ac538368266475b5f

See more details on using hashes here.

File details

Details for the file echostream_botocore-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for echostream_botocore-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdf4bd227261550820b2f9d4cb35f4aacd9c24455b8080400c435fb33e9a85b1
MD5 e0bdd31ae9366e2db7917a23e3a42abc
BLAKE2b-256 fc0e957907dca75d8a32e446238721c281f4c485c357e5aee10eb4a47ff8f973

See more details on using hashes here.

Supported by

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