generated from linz/template-python-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: automatically refresh role assumptions (#106)
* feat: use role assumption helper to assume roles * refactor: fixup lint/types * feat: use $AWS_ROLE_CONFIG_PATH to be more consistent * refactor: remove unused named tuple
- Loading branch information
Showing
5 changed files
with
104 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from dataclasses import dataclass | ||
from typing import Optional | ||
|
||
|
||
# pylint: disable=too-many-instance-attributes | ||
@dataclass | ||
class CredentialSource: | ||
bucket: str | ||
"""Base bucket location may be a subset of bucket""" | ||
type: str | ||
"""Type of role assumption generally "s3""" | ||
prefix: str | ||
""" | ||
Prefix for what the role is valid, generally starts with s3:// | ||
""" | ||
accountId: str | ||
""" | ||
AWS Account id of the bucket owner | ||
""" | ||
roleArn: str | ||
""" | ||
Role arn to use | ||
""" | ||
externalId: Optional[str] = None | ||
""" | ||
Role external ID if it exists | ||
""" | ||
roleSessionDuration: Optional[int] = 1 * 60 * 60 | ||
""" | ||
Max duration of the assumed session in seconds, default 1 hours | ||
""" | ||
flags: Optional[str] = None | ||
""" | ||
flags that the role can use either "r" for read-only or "rw" for read-write | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters