EC2Tagger.yaml [38:58]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          def boto3_client(resource, assumed_credentials=None):
              config = Config(
                  retries=dict(
                      max_attempts=40
                  )
              )
              if assumed_credentials:
                  client = boto3.client(
                      resource,
                      aws_access_key_id=assumed_credentials['AccessKeyId'],
                      aws_secret_access_key=assumed_credentials['SecretAccessKey'],
                      aws_session_token=assumed_credentials['SessionToken'],
                      config=config
                  )
              else:
                  client = boto3.client(
                      resource,
                      config=config
                  )

              return client
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/actions.py [15:35]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
def boto3_client(resource, assumed_credentials=None):
    config = Config(
        retries=dict(
            max_attempts=40
        )
    )
    if assumed_credentials:
        client = boto3.client(
            resource,
            aws_access_key_id=assumed_credentials['AccessKeyId'],
            aws_secret_access_key=assumed_credentials['SecretAccessKey'],
            aws_session_token=assumed_credentials['SessionToken'],
            config=config
        )
    else:
        client = boto3.client(
            resource,
            config=config
        )

    return client
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



