Amazon S3
Load data from an Amazon S3 bucket
An Amazon S3 dataset reads data directly from your S3 bucket. Your files stay in your bucket, so MD.ai needs continued read access to it.
Grant access
Your bucket policy must allow MD.ai's IAM user at least s3:ListBucket and s3:GetObject:
arn:aws:iam::588536274363:user/external-data-access-userClick Sample Bucket Policy in the connect form for a policy you can copy. For a bucket named my-bucket, it looks like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::588536274363:user/external-data-access-user" },
"Action": ["s3:ListBucket", "s3:GetObject"],
"Resource": ["arn:aws:s3:::my-bucket", "arn:aws:s3:::my-bucket/*"]
}
]
}The connect form shows the IAM user for your deployment; dedicated deployments may use a different one.
Keep this policy in place. Images are read from the bucket when they are viewed, so removing access breaks the dataset.
Connect the bucket
On the project's Edit page, find your Amazon S3 dataset.
Enter the Bucket Name and, to load only part of the bucket, a Folder Prefix (optional). An s3:// prefix or trailing slash on the bucket name is removed automatically.
Select Confirm Bucket Permissions and click Connect.
The data is then processed. You can also connect a bucket with the CLI: mdai dataset connect.
If connecting fails, the form shows why: No objects found in bucket, Insufficient permissions or bucket not found, or Connection error.
Sync changes
The bucket isn't watched for changes. To load files added since you connected, click Re-Sync Bucket.
A re-sync only adds data. To also remove exams, series and images whose files were deleted from the bucket, select Remove data deleted from bucket before re-syncing. Annotations and model outputs on the removed data are deleted too, and this can't be undone.