sso-aws - AWS SSO Login Utility 🔒
Overview 📝
The AWS SSO Login Utility is a Python package that simplifies the process of logging in to AWS Single Sign-On (SSO) and retrieving an AWS session for programmatic access. With just a single function call, get_aws_session, you can easily obtain an AWS session to use instead of boto3.
Installation 🚀
You can install the package via pip:
pip install sso-aws
Usage 💻
To use the utility, follow these steps:
-
Import the package:
from aws_sso_login import get_aws_session
-
Invoke the
get_aws_sessionfunction with the required parameters:session = get_aws_session(region='us-west-2', role_name='MyRole', account_id='123456789012', sso_endpoint='https://example.awsapps.com/start')
Make sure to provide the correct values for
region,role_name,account_id, andsso_endpoint. -
Now you can use the returned
sessionobject instead ofboto3to interact with AWS services:# Example: List S3 buckets s3_client = session.client('s3') response = s3_client.list_buckets() print(response['Buckets'])
Example 📃
Here's an example that demonstrates how to use the utility:
from aws_sso_login import get_aws_session
region = 'us-west-2'
role_name = 'MyRole'
account_id = '123456789012'
sso_endpoint = 'https://example.awsapps.com/start'
session = get_aws_session(region=region, role_name=role_name, account_id=account_id, sso_endpoint=sso_endpoint)
# Use the session object for AWS API calls
s3_client = session.client('s3')
response = s3_client.list_buckets()
print(response['Buckets'])
Contributing 👥
Contributions are welcome! If you find any issues or want to enhance this utility, please submit an issue or a pull request in the GitHub repository.
License 📜
This project is licensed under the MIT License.
Acknowledgements 👏
This utility was inspired by the need for a simpler way to log in to AWS SSO and retrieve AWS sessions programmatically. Special thanks to all the contributors and the open-source community.
Contact ✉️
If you have any questions, suggestions, or feedback, feel free to reach out to the project maintainer at GitHub
Enjoy using the AWS SSO Login Utility! ✨
Metadata
Release files for sso-aws 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sso-aws-1.0.5.tar.gz | 2.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sso_aws-1.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.9 kB
Release files / sso-aws-1.0.5.tar.gz
| Download URL | sso-aws-1.0.5.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b23605cbae21a991792302753c31f94c5f14a02cc54f104bcc04d1e227be021
|
|
BLAKE2b-256 checksum How to use checksums |
8a74e9cf2bfdfc657f0f3d3a30977788efd6e0628209eca35ce80cc6b3c8f16b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.1
|
Release files / sso_aws-1.0.5-py3-none-any.whl
| Download URL | sso_aws-1.0.5-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1bca0671bd34e0bd897d5012e23fbdfe51e922d8efff4ddcf060ef06a247e24
|
|
BLAKE2b-256 checksum How to use checksums |
7c173cc4b4d095187d42793aaaecd27606f55f3dc239965bf9bb5a82b8c28ec5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.1
|
Security for sso-aws 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.