https://github.com/awslabs/iam-roles-anywhere-session
This package provides an easy way to create a refreshable boto3 Session with AWS Roles Anywhere.
Science Score: 13.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
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.6%) to scientific vocabulary
Keywords
Repository
This package provides an easy way to create a refreshable boto3 Session with AWS Roles Anywhere.
Basic Info
- Host: GitHub
- Owner: awslabs
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://awslabs.github.io/iam-roles-anywhere-session/
- Size: 36.1 KB
Statistics
- Stars: 57
- Watchers: 4
- Forks: 9
- Open Issues: 0
- Releases: 4
Topics
Metadata Files
README.md
IAM Roles Anywhere Session
This package provides an easy way to create a refreshable boto3 Session with IAM Roles Anywhere, without defining an AWS profile with relevant configuration for IAM roles anywhere.
This package implements the algorithm described here: https://docs.aws.amazon.com/rolesanywhere/latest/userguide/authentication-sign-process.html.
Requirements
- Python 3.8 or later
- Creation and configuration of a trust anchor. See documentation
- Valid X.509 certificate, private key, and optionally a certificate chain file associated with your trust anchor
Install
- From PyPi
bash
pip install iam-rolesanywhere-session
- From source
bash
git clone https://github.com/awslabs/iam-roles-anywhere-session.git
cd iam-roles-anywhere-session
python3 -m pip install ./
Configuration
For this package to work you will need to have at your disposal your certificate and private_key file in a PEM format.
IAMRoleAnywhereSession will take multiple arguments:
| Name | Description | Type | Default value |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------------------------------------------- |
| profilearn | The Amazon Resource Name (ARN) of the profile. | string | None |
| rolearn | The Amazon Resource Name (ARN) of the role to assume. | string | None |
| trustanchorarn | The Amazon Resource Name (ARN) of the trust anchor. | string | None |
| certificate | The x509 certificate file, in PEM format. | path or bytes | None |
| privatekey | The certificate private key file, in PEM Format. | path or bytes | None |
| privatekeypassphrase | The passphrase use to decrypt private key file. | string | None |
| region | The name of the region where you configured IAM Roles Anywhere. | string | us-east-1 |
| sessionduration | The duration, in seconds, of the role session. The value specified can range from 900 seconds (15 minutes) up to 3600 seconds (1 hour). | int | 3600 |
| servicename | An identifier for the service, used to build the botosession. | string | rolesanywhere |
| endpoint | Roles Anywhere API endpoint to use | string | '{servicename}.{regionname}.amazonaws.com' |
| verify | Whether to validate SSL certificates, or the path to a trusted certificate authority | bool or str | None |
| proxies | Proxy endpoint(s) for use behind private networks with a proxy. | dict | {} |
| proxiesconfig | A dictionary of additional proxy configurations. | dict | {} |
python
from iam_rolesanywhere_session import IAMRolesAnywhereSession
roles_anywhere_session = IAMRolesAnywhereSession(
profile_arn="arn:aws:rolesanywhere:eu-central-1:************:profile/a6294488-77cf-4d4a-8c5c-40b96690bbf0",
role_arn="arn:aws:iam::************:role/IAMRolesAnywhere-01",
trust_anchor_arn="arn:aws:rolesanywhere:eu-central-1::************::trust-anchor/4579702c-9abb-47c2-88b2-c734e0b29539",
certificate='certificate.pem',
private_key='privkey.pem',
region="eu-central-1"
).get_session()
s3 = roles_anywhere_session.client("s3")
print(s3.list_buckets())
Documentation
You can find here the complete documentation with additional usage and module reference.
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the Apache 2
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
- Create event: 2
- Release event: 1
- Issues event: 7
- Watch event: 9
- Delete event: 2
- Member event: 2
- Issue comment event: 12
- Push event: 6
- Pull request review event: 2
- Pull request event: 6
- Fork event: 3
Last Year
- Create event: 2
- Release event: 1
- Issues event: 7
- Watch event: 9
- Delete event: 2
- Member event: 2
- Issue comment event: 12
- Push event: 6
- Pull request review event: 2
- Pull request event: 6
- Fork event: 3
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 6
- Total Committers: 2
- Avg Commits per committer: 3.0
- Development Distribution Score (DDS): 0.167
Top Committers
| Name | Commits | |
|---|---|---|
| Thomas Buatois | t****s@a****r | 5 |
| tbuatois | 9****s@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: almost 2 years ago
All Time
- Total issues: 2
- Total pull requests: 7
- Average time to close issues: 17 days
- Average time to close pull requests: 3 days
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ad-m-ss (1)
- vk496 (1)
- wkzqn (1)
- FrancescoSaverioZuppichini (1)
- icarterpaloit (1)
- tbuatois (1)
- skeggse (1)
Pull Request Authors
- tbuatois (7)
- cboin1996 (2)
- tylersmith34 (2)
- mathieudupoux (1)
- liwadman (1)
- jeski-jit (1)
- cpeuvrel (1)