STS duration seconds ENVIRONMENT Variable
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 4.6k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 13
Description
### Describe the feature
An ENVIRONMENT variable to set the STS duration seconds, such as:
- `AWS_ROLE_SESSION_DURATION_SECONDS`
### Use Case
Imagine engineers wanting to use ENVIRONMENT variables for STS Assume Role/Assume Role with Web Identity and we want to override the default duration (seconds), there's already environment variables for:
- `AWS_ROLE_ARN`
- `AWS_ROLE_SESSION_NAME`
- `AWS_WEB_IDENTITY_TOKEN_FILE`
In a CI/CD Pipeline (GitLab OIDC AWS Authentication), to reduce the amount of code, keeping the codebase simple and slim no need to call aws CLI sts commands but rather use environment variables - from a platform engineering/operational perspective easier to support and maintain.
- https://awscli.amazonaws.com/v2/documentation/api/latest/topic/config-vars.html#:~:text=be%20automatically%20generated.-,duration_seconds,-%2D%20The%20duration%2C%20in
- https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role-with-web-identity.html#:~:text=for%20the%20role.-,This%20setting%20can%20have%20a%20value%20from%201%20hour%20to%2012%20hours,-.%20To%20learn%20how
.... however there is no environment variable to set `duration-seconds`, nothing shows up in this repository seemingly to suggest it's supported.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CLI version used
Pulling docker image amazon/aws-cli:latest ...
### Environment details (OS name and version, etc.)
Mac OS Python/3.10.6 Darwin/22.1.0 source/x86_64
Contributor guide
Assessment
This issue has not been assessed yet.