Stripe connector for Amazon S3Beta
Automate recurring CSV file imports from your Amazon S3 bucket to Stripe.
This guide explains how to import CSV files from Amazon S3 into the Stripe Data Management Platform. By following these steps, you set up an automated job for importing data to keep your Stripe products up-to-date.
Prerequisites
Before starting the integration, make sure you have the following:
- An active AWS account and S3 bucket with access to the relevant CSV files.
- Admin account access to the Stripe Dashboard.
- An automated file delivery job for sending new CSV files to your S3 bucket regularly (optional).
- A sample CSV file and data template in the Stripe Data Management Dashboard to verify your data template is correctly configured (optional).
- Be aware that the Amazon List Object API doesn’t support filtering objects by LastModified. As a result, you need to list all bucket contents for each nightly import. Manage your bucket carefully, allowing the associated IAM role to access only the data you want Stripe to import. We suggest applying an S3 lifecycle rule to expire objects after 14 days and maintaining fewer than 1000 objects in the DataConnection source.
Log in to your AWS account
You need access to your AWS Access Console during the configuration process.
- Sign in to the AWS Management Console
Prepare your CSV Files in Amazon S3
To validate your connection configuration, use well-formatted CSV data in your S3 bucket. The configuration process shows you available files, and runs an initial sync when the connection is configured.
- Visit your Amazon S3 console
- Make sure that your CSV files are stored in a designated S3 bucket and organized according to your import preferences.
- If you don’t currently have an S3 bucket, you can follow the AWS guidelines for creating your first bucket.
- Remember the bucket name and region because you need them for future steps.
- Keep your AWS Console open because you need to configure an IAM role in future steps.
Configure the Stripe Amazon S3 Connector to import CSV files from your S3 Bucket
- Sign in to the Stripe Data Management Connector Dashboard
- Click + Set up connector.
- Provide a unique connector name for this Connection. Consider using details about the data source, objects in the file, and product destination to create a strong unique name.
- In your Amazon console, navigate to the IAM console.
- The next step of the Stripe Amazon S3 Connector setup provides details to Create an IAM Role using a Custom trust policy.
- In the navigation pane of the console, choose Roles and then choose Create role.
- Choose the Custom trust policy role type.
- To create your trust policy, go to your AWS IAM Dashboard, click Roles > Create role > Custom trust policy, then copy paste the code block below and click Next.
- To create your permission policy, click Create policy which opens a new tab. Select JSON and replace the existing policy text by copying and pasting the code block below. In the Resource section of the code block, replace
USER_TARGET_BUCKET
with your intended bucket name. Click Next, and add a policy names, along with any tags (optional), and click Create policy. - To create a role name, return to the previous tab where your policies are listed and click the refresh icon. The newly created policy now shows up in the list. Click the checkbox to select the policy, scroll down and click Next. Copy and paste the role name from the setup and click Create role.
- The following step of the Stripe Amazon S3 Connector setup establishes the connection between your Amazon S3 bucket and Stripe.
- From the AWS Console, find and provide your AWS Account ID.
- Provide the Bucket Name and Region saved from your AWS Console during Step 2.3.
- If you use folders to organize your files in your Amazon S3 bucket, specify a folder within the above bucket.
- If you specify a folder within the above bucket, we only fetch data from this folder, not the entire bucket.
- After successfully setting up a new connector, Stripe fetches all data from the Amazon S3 bucket that was modified in the last 90 days.
- We fetch data once each day.
- Only objects with a LastModified date later than the last sync are imported for recurring imports.
- Step 4 previews the files available in the connected Amazon S3 bucket and allows you to associate them with a data template.
- The file preview validates that your credentials connect Stripe with the expected Amazon S3 bucket and folder.
- The data template associates this connection with an expected file format for initial and recurring imports.
- Click Done to create an Active Data Connection and initiate the initial Data Import.
- Stripe fetches all data from the Amazon S3 bucket that was modified in the last 90 days.
- We fetch data once per day.
Maintaining your Amazon S3 connection
After your connection is established, we fetch your data once per day. To monitor the health of your connection, you can perform the following actions:
- Visit the Stripe Data Management Connector dashboard for the status and last sync details of your established connections.
- Manage a single Connection by clicking on a connector.
- You can edit the connector name or data template, re-authenticate a broken connection, and delete a connection.