Information for: DEVELOPERS   PARTNERS

Amazon S3 file management with Acquia Lift

Acquia Lift uses Amazon S3 storage for several purposes, including uploading import files to the Acquia Lift service and exporting visitor information. You can use the information on this page to help you connect to your Amazon S3 bucket to manage your Acquia Lift-related files.

Requirements

Regardless of whether you’re sending files to Amazon S3 or obtaining files stored earlier, be sure to plan for the following requirements:

Component Requirement
File client Due to permission restrictions preventing you from viewing the contents of the main S3 bucket, Acquia suggests you use a client specifically designed to access Amazon S3, such as CloudBerry Explorer , Cyberduck , or the AWS Command Line Interface.
Amazon S3 bucket credentials

Available in the Acquia Lift interface at Admin > Manage Customers by clicking your customer name. Acquia Lift displays the Customer Details webpage, containing the following fields:

  • AWS Access Key ID
  • AWS Secret Access Key
  • S3 Bucket URL

Your Amazon S3 folder path will display like the following paths, based on where your S3 bucket is located:

  • US: lift.prod.api-file.us-east-1//INBOX
  • Europe: lift.prod.api-file.eu-central-1//INBOX
  • Australia: lift.prod.api-file.ap-southeast-2//INBOX

If the default INBOX directory doesn’t exist, you must create it.

Uploading import files

To upload one or more files to Acquia Lift using the Amazon S3 bucket associated with your account, complete the following steps:

  1. Retrieve your credentials in Acquia Lift from your user information.
  2. Configure your Amazon S3 client, using the AWS Access Key ID and AWS Secret Access Key as credentials and the S3 Bucket URL as your path.
  3. Connect to the Amazon S3 bucket provided by Acquia using a local computer client.
  4. Upload the import file you created to your Amazon S3 path. If you have several import files, you can upload all the files at the same time.

Acquia Lift uploads the file and lists the file on the Import/Export page.

After Acquia Lift uploads an import file, it reads each file and then moves the import file to the ARCHIVE path, renaming the file to include the date and time the file was moved. For example, if you name your import file capture.csv and your S3 bucket is located in the United States, the new file name will be like the following:

lift.prod.api-file.us-east-1/[account_id]/ARCHIVE/capture.csv.2014-09-24-16-55

Retrieving your export file

Acquia Lift saves completed export files to an Amazon S3 directory associated with your account. To download your export file, complete the following steps:

  1. Connect to the Amazon S3 directory provided by Acquia using a local computer client. For example, the S3 folder path will be like the following paths, based on where your S3 directory is located:

    • US: lift.prod.api-file.us-east-1//OUTBOX
    • Europe: lift.prod.api-file.eu-central-1//OUTBOX
    • Australia: lift.prod.api-file.ap-southeast-2//OUTBOX

    If you need help accessing your S3 directory, contact Acquia Support.

    Note

    Since permission restrictions prevent you from viewing the contents of the main S3 directory, Acquia suggests you use a client specifically designed to access Amazon S3, such as CloudBerry Explorer or Cyberduck.

  2. Download the export file you requested from your Amazon S3 directory.

Each export file includes a separate file including the headers for each column of field data in the export file. Header files have the same names as their associated export files, with _header appended to each file name. For example, exporting the event information from Acquia Lift would create files with names like the following:

  • event_2014-12-27_1.csv
  • event_2014-12-27_1.csv_header

Note

The Import/Export webpage doesn’t display header files.

Examining the export file

To ensure other applications can read the export file’s data as expected, Acquia Lift adds escape characters ( \ ) to the export file. The escape characters precede certain special characters in the file, including the following:

  • Pipe symbol: \|
  • Carriage return: \n
  • Linefeed: \r

Using escape characters ensures there is no confusion if the special characters are in the content of a field, such as Content Title.

Viewing your S3 bucket’s top-level information

Some users must access the top level of their bucket to browse the entire structure. To do this, you must use a specific structure, or you can’t view your data:

s3://lift.prod.api-file.eu-central-1/EXAMPLEINC/

Be aware the S3 URL uses a trailing slash. URLs without the trailing slash won’t work, due to Amazon restrictions for user security.

S3 bucket file storage policy

Acquia Lift will delete files in the INBOX, ARCHIVE, and OUTBOX directories created more than 31 days ago.