https://github.com/awslabs/aws-iot-core-credential-provider-session-helper
This package provides an easy way to create a refreshable Boto3 Session using the AWS IoT Core credential provider.
https://github.com/awslabs/aws-iot-core-credential-provider-session-helper
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.5%) to scientific vocabulary
Keywords
Repository
This package provides an easy way to create a refreshable Boto3 Session using the AWS IoT Core credential provider.
Basic Info
- Host: GitHub
- Owner: awslabs
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://awslabs.github.io/aws-iot-core-credential-provider-session-helper/
- Size: 1.44 MB
Statistics
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 16
- Releases: 11
Topics
Metadata Files
README.md
AWS IoT Core Credential Provider Session Helper
This package provides an easy way to create a refreshable Boto3 Session using the AWS IoT Core credential provider.
Features
- Automatic refresh of Boto3 credentials through requests to the AWS IoT Core credential provider. No need to manage or maintain refresh times.
- Uses the underlying AWS CRT Python bindings for querying the credential provider instead of the Python standard library. This provides support for both certificate and private keys as files or as environment variables.
- Extensible to using other TLS methods such as PKCS#11 hardware security modules (see Advanced section).
- Only requires four function calls to create a session helper, Boto3 session, Boto3 client, and then client API calls.
Requirements
- Python 3.8 - 3.11. Support not include for 3.7 as that version will be end of life in June, 2023. If 3.7 support is important, please open an issue to discuss.
Installation
You can install AWS IoT Core Credential Provider Session Helper via pip from PyPI:
console
python3 -m pip install awsiot-credentialhelper
Usage
Prior to use, ensure all cloud-side resources for IAM and AWS IoT Core have been properly created and configured. Then, with the AWS IoT registered X.509 certificate and corresponding private key (e.g., iot_thing.pem and iot_thing.pem.key), you can create and use the helper as follows:
```python from awsiotcredentialhelper.boto3session import Boto3SessionProvider
Create boto3 session object
boto3session = Boto3SessionProvider( endpoint="yourendpoint.credentials.iot.us-west-2.amazonaws.com", rolealias="yourawsiotrolealiasname", certificate="iotthing.pem", privatekey="iotthing.pem.key", thingname="iotthing", ).getsession()
Use in regular Boto3 chained operations, such as returning caller identity
print(boto3session.client("sts").getcalleridentity()) {'UserId': 'AROA...F3D:4686c...0a0d', 'Account': '1234567890', 'Arn': 'arn:aws:sts::1234567890:assumed-role/iamrole_name/4686c...0a0d', 'ResponseMetadata': {'RequestId': 'cc04...10bc', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'cc04...10bc', 'content-type': 'text/xml', 'content-length': '554', 'date': 'Tue, 21 Feb 2023 21:18:23 GMT'}, 'RetryAttempts': 0}}
Or by creating a service client and making API calls
iot = boto3session.client("iot") result = iot.listthings() ```
Please see the package documentation for more details and advanced use.
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the Apache 2.0 license. Details on third party packages used by this package can be found here.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
This project template was generated from a fork of @cjolowicz's Hypermodern Python Cookiecutter template.
Owner
- Name: Amazon Web Services - Labs
- Login: awslabs
- Kind: organization
- Location: Seattle, WA
- Website: http://amazon.com/aws/
- Repositories: 914
- Profile: https://github.com/awslabs
AWS Labs
GitHub Events
Total
- Issues event: 1
- Watch event: 1
- Delete event: 66
- Issue comment event: 63
- Pull request event: 134
- Create event: 70
Last Year
- Issues event: 1
- Watch event: 1
- Delete event: 66
- Issue comment event: 63
- Pull request event: 134
- Create event: 70
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 58
- Total Committers: 2
- Avg Commits per committer: 29.0
- Development Distribution Score (DDS): 0.017
Top Committers
| Name | Commits | |
|---|---|---|
| Gavin Adams | g****s@a****m | 57 |
| Amazon GitHub Automation | 5****o@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 1
- Total pull requests: 543
- Average time to close issues: N/A
- Average time to close pull requests: 15 days
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.94
- Merged pull requests: 19
- Bot issues: 0
- Bot pull requests: 527
Past Year
- Issues: 1
- Pull requests: 198
- Average time to close issues: N/A
- Average time to close pull requests: 11 days
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.88
- Merged pull requests: 9
- Bot issues: 0
- Bot pull requests: 192
Top Authors
Issue Authors
- dependabot[bot] (2)
- michaelthomasletts (1)
Pull Request Authors
- dependabot[bot] (736)
- gadams999 (23)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 4,798 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 13
- Total maintainers: 1
pypi.org: awsiot-credentialhelper
AWS IoT Core Credential Provider Session Helper
- Homepage: https://github.com/awslabs/aws-iot-core-credential-provider-session-helper
- Documentation: https://awslabs.github.io/aws-iot-core-credential-provider-session-helper
- License: Apache-2.0
-
Latest release: 19.4.6
published almost 3 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- crazy-max/ghaction-github-labeler v4.1.0 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- peaceiris/actions-gh-pages v3.9.2 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish v1.6.4 composite
- release-drafter/release-drafter v5.22.0 composite
- salsify/action-detect-and-tag-new-version v2.0.3 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- codecov/codecov-action v3.1.1 composite
- haya14busa/action-cond v1 composite
- furo ==2022.12.7
- myst_parser ==0.18.1
- sphinx ==6.1.3
- sphinx-click ==4.4.0
- 103 dependencies
- Pygments >=2.10.0 develop
- black >=21.10b0 develop
- coverage >=6.2 develop
- darglint >=1.8.1 develop
- flake8 >=4.0.1 develop
- flake8-bandit >=2.1.2 develop
- flake8-bugbear >=21.9.2 develop
- flake8-docstrings >=1.6.0 develop
- flake8-rst-docstrings >=0.2.5 develop
- furo >=2021.11.12 develop
- isort >=5.10.1 develop
- mypy >=0.930 develop
- myst-parser >=0.16.1 develop
- pep8-naming >=0.12.1 develop
- pre-commit >=2.16.0 develop
- pre-commit-hooks >=4.1.0 develop
- pytest >=6.2.5 develop
- pyupgrade >=2.29.1 develop
- safety >=1.10.3 develop
- sphinx >=4.3.2 develop
- sphinx-autobuild >=2021.3.14 develop
- sphinx-click >=3.0.2 develop
- typeguard >=2.13.3 develop
- xdoctest >=0.15.10 develop
- awscrt ^0.16.9
- boto3 ^1.20.27
- botocore ^1.23.27
- python ^3.8
- typing-extensions ^4.5.0