def sts_conn(service, service_type='<STR_LIT>', future_expiration_minutes=<NUM_LIT:15>):
def decorator(f):<EOL><INDENT>@wraps(f)<EOL>def decorated_function(*args, **kwargs):<EOL><INDENT>if kwargs.get("<STR_LIT>"):<EOL><INDENT>kwargs[service_type] = kwargs.pop("<STR_LIT>")<EOL>kwargs.pop("<STR_LIT>", None)<EOL>kwargs.pop("<STR_LIT>", None)<EOL><DEDENT>else:<EOL><INDENT>kwargs[service_type] = boto3_cached_conn(<EOL>service,<EOL>service_type=service_type,<EOL>future_expiration_minutes=future_expiration_minutes,<EOL>account_number=kwargs.pop('<STR_LIT>', None),<EOL>assume_role=kwargs.pop('<STR_LIT>', None),<EOL>session_name=kwargs.pop('<STR_LIT>', '<STR_LIT>'),<EOL>external_id=kwargs.pop('<STR_LIT>', None),<EOL>region=kwargs.pop('<STR_LIT>', '<STR_LIT>'),<EOL>arn_partition=kwargs.pop('<STR_LIT>', '<STR_LIT>')<EOL>)<EOL><DEDENT>return f(*args, **kwargs)<EOL><DEDENT>return decorated_function<EOL><DEDENT>return decorator<EOL>
This will wrap all calls with an STS AssumeRole if the required parameters are sent over.
Namely, it requires the following in the kwargs:
- Service Type (Required)
- Account Number (Required for Assume Role)
- IAM Role Name (Required for Assume Role)
- Region (Optional, but recommended)
- AWS Partition (Optional, defaults to 'aws' if none specified)
- IAM Session Name (Optional, but recommended to appear in CloudTrail)

If `force_client` is set to a boto3 client, then this will simply pass that in as the client.
`force_client` is mostly useful for mocks and tests.
:param service:
:param service_type:
:param future_expiration_minutes:
:return: