How to connect an Amazon S3 bucket
This tutorial shows you how to give Dattos access to an Amazon S3 bucket so that processes can retrieve input files and deliver exported files to it. To learn more about the integration as a whole, see File repositories: which ones Dattos connects to and how to set them up.
What you need
Access to the AWS console with permission to create users and policies in IAM (or someone on your cloud team who can do this).
The bucket must already exist. Dattos does not create buckets: if the name you enter does not exist, the connection will fail.
1. Create the folders in the bucket
In S3, folders are prefixes in file names. For a folder to appear in Dattos’ list even when it is empty, create it in the console first: open the bucket and, on the Objects tab, click Create folder. For example, dattos/entrada/extratos and dattos/saida/relatorios.
2. Create access for Dattos in AWS
In the IAM console, open Users and create a user exclusively for Dattos. The user does not need access to the AWS console.
Give this user a policy that allows it to list the contents (
s3:ListBucket) and read, write, and delete files (s3:GetObject,s3:PutObject, ands3:DeleteObject) only in the bucket Dattos will use. One simple way to do this is to open the user, go to Permissions › Add permissions › Create inline policy, choose the JSON editor, and paste the example policy below.Still on the user page, open the Security credentials tab and, under Access keys, click Create access key.
AWS displays a page with best practices and asks you to choose a use case. Select Other and continue.
Click Create access key. On the next page, click Show to view the Secret access key, or Download .csv file to download both values. This is the only time AWS shows the secret; if you lose it, delete the key and create a new one.
Why AWS warns you about the access key: it is a long-term credential, and AWS recommends using temporary credentials whenever possible. Dattos uses an access key to connect to S3, so protect the key with these measures: a dedicated user, permissions limited to the Dattos bucket, and regular key rotation.
Example policy, replacing nome-do-bucket with your bucket name:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": "arn:aws:s3:::nome-do-bucket"
},
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"],
"Resource": "arn:aws:s3:::nome-do-bucket/*"
}
]
}Delete permission is required because Dattos moves files it has read into control subfolders (.processing, .processed, and .error). In S3, moving a file means copying it and deleting the original.
3. Add the credential in Dattos
Click the gear icon and open General › Credentials.
Click + New credential and, on the Storage tab, choose Amazon S3.
Fill in the fields:
Field | What to enter | Required |
|---|---|---|
Credential name | A name that identifies the bucket, such as "S3 Finance - statements" | Yes |
Access Key ID | The ID of the key created in step 2 | Yes |
Secret Access Key | The secret for the key created in step 2 | Yes |
Bucket name | The bucket name only, without | Yes |
Region | The region where the bucket was created, in AWS format (for example, | Yes |
Prefix | Optional. Limits Dattos to part of the bucket, for example | No |
Privacy profiles | Who can use this credential in processes | Yes |
Click Save.
Amazon S3 does not have a Test connection button. To verify access, follow the next step.
4. Check the connection and link the bucket to a process
Open a Turbo AI process with a published flow and go to Source Directory.
Click Edit on the desired source, then click Add destination.
Under Storage Integration, select the credential you created.
If the bucket folders appear under Import Folders, access is working. Select the folder and save.
For the complete step-by-step instructions, including output setup, see Integrating with file repositories: source and output directories.
How to view bucket files
Dattos displays folders, but not files. To check whether a file has arrived, was moved to .processed or .error, or whether an export was delivered, open the bucket in the S3 console on the Objects tab, using a user from your company who has read access.
Common issues
What you see | Likely cause |
|---|---|
Message saying that the bucket or container was not found | The Bucket name is incorrect or the bucket does not exist |
Error loading folders | The key is incorrect, the key is disabled in AWS, the region does not match the bucket's region, or the user lacks permission to list its contents |
Folders appear, but the run ends with an error while reading or moving the file | The user lacks permission to read, write, or delete files |
A folder does not appear in the list | The folder is outside the specified Prefix or has not yet been created in the bucket |