Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an Transfer Family server and an AS2 process. The agreement defines the file and message transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family combines a server, local profile, partner profile, certificate, and other attributes.

The partner is identified with the PartnerProfileId , and the AS2 process is identified with the LocalProfileId .

See also: AWS API Documentation

Request Syntax

response = client.create_agreement(
            'Key': 'string',
            'Value': 'string'
  • Description (string) -- A name or short description to identify the agreement.
  • ServerId (string) --


    A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses.

  • LocalProfileId (string) --


    A unique identifier for the AS2 local profile.

  • PartnerProfileId (string) --


    A unique identifier for the partner profile used in the agreement.

  • BaseDirectory (string) --


    The landing directory (folder) for files transferred by using the AS2 protocol.

    A BaseDirectory example is /DOC-EXAMPLE-BUCKET/home/mydirectory .

  • AccessRole (string) --


    With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths . We use the file’s parent directory (for example, for --send-file-paths /bucket/dir/file.txt , parent directory is /bucket/dir/ ) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containing relevant metadata of the transmission. So, the AccessRole needs to provide read and write access to the parent directory of the file location used in the StartFileTransfer request. Additionally, you need to provide read and write access to the parent directory of the files that you intend to send with StartFileTransfer .

  • Status (string) -- The status of the agreement. The agreement can be either ACTIVE or INACTIVE .
  • Tags (list) --

    Key-value pairs that can be used to group and search for agreements.

    • (dict) --

      Creates a key-value pair for a specific resource. Tags are metadata that you can use to search for and group a resource for various purposes. You can apply tags to servers, users, and roles. A tag key can take more than one value. For example, to group servers for accounting purposes, you might create a tag called Group and assign the values Research and Accounting to that group.

      • Key (string) -- [REQUIRED]

        The name assigned to the tag that you create.

      • Value (string) -- [REQUIRED]

        Contains one or more values that you assigned to the key name you create.

Return type



Response Syntax

    'AgreementId': 'string'

Response Structure

  • (dict) --

    • AgreementId (string) --

      The unique identifier for the agreement. Use this ID for deleting, or updating an agreement, as well as in any other API calls that require that you specify the agreement ID.


  • Transfer.Client.exceptions.ServiceUnavailableException
  • Transfer.Client.exceptions.InternalServiceError
  • Transfer.Client.exceptions.InvalidRequestException
  • Transfer.Client.exceptions.ResourceExistsException
  • Transfer.Client.exceptions.ResourceNotFoundException
  • Transfer.Client.exceptions.ThrottlingException