aws-assume-role-lib
uses monotonic versioning.
- Fix CLI support
- Update boto3 version requirement for
SourceIdentity
validation
- Fixed
get_assumed_role_session_arn()
, which incorrectly usediam
instead ofsts
in the ARN. - If
RoleSessionName
is not provided butSourceIdentity
is, theSourceIdentity
value will be used forRoleSessionName
, rather than thebotocore
-generated value.- Added special value
AUTOMATIC_ROLE_SESSION_NAME
; settingRoleSessionName
to this will cause it to use pre-2.8 behavior (i.e., always usebotocore
-generated value).
- Added special value
- Updated for PEP 561 (typing) compliance. Link to single-file module has changed to https://raw.githubusercontent.com/benkehoe/aws-assume-role-lib/stable/aws_assume_role_lib/aws_assume_role_lib.py
- Link to single-file module now uses
stable
branch, which will point to a release commit.
- Link to single-file module now uses
- If
region_name=None
(the default), the child session region is linked to the parent session region (not copied, which happens ifregion_name=True
). If the parent session is using a config profile, this means the child session will have a region, rather than needing/using a separately-set region (e.g., via theAWS_DEFAULT_REGION
environment variable). For safety, this release increments the compatibility version to 2. - Added command line functionality.
PolicyArns
can be provided as a list of ARNs in addition to the verbose list-of-single-element-dicts required by the API.
generate_lambda_session_name()
now performs truncation to return a value that is always 64 characters or less.
- Ensured new functions get imported when doing
from aws_assume_role_lib import *
.
- Added
get_role_arn()
andget_assumed_role_session_arn()
functions.
- Added support for the new
SourceIdentity
parameter.
Note that you don't need to wait for any future new parameters to be added to the library to start using them, because they can be passed in through the additional_kwargs
parameter.
For SourceIdentity
, before v1.4 this would have looked like including the parameter additional_kwargs={'SourceIdentity': '...'}
to the assume_role()
call.
- Added the
generate_lambda_session_name()
function.
- Added
region_name
parameter. - Added
patch_boto3()
function.