def extract_boto_args_from_env(env_vars):
    """Return boto3 client args dict with environment creds."""
    boto_args = {}
    for i in ['aws_access_key_id', 'aws_secret_access_key',
              'aws_session_token']:
        if env_vars.get(i.upper()):
            boto_args[i] = env_vars[i.upper()]
    return boto_args
def extract_boto_args_from_env ( env_vars ) : boto_args = { } for i in [ 'aws_access_key_id' , 'aws_secret_access_key' , 'aws_session_token' ] : if env_vars . get ( i . upper ( ) ) : boto_args [ i ] = env_vars [ i . upper ( ) ] return boto_args
Return boto3 client args dict with environment creds.