Documentation
Search…
Cloud integrations

AWS

Granting cross-account access

If your data is stored in a private AWS S3 bucket, you can submit your image URLs in virtual-hosted-style format: https://<bucket-name>.s3.<region>.amazonaws.com/<key>.
We will then use the S3 API to access data from your S3 bucket, using AWS account ID 931508227573 (canonical ID a2c85e730d80dcb51a2c0e1a8f852cf6dc8d6e04d9e00f49239c324de3c1e3e1). We generate temporary presigned URLs to serve the images from your S3 bucket in our frontend. These URLs expire after 24 hours.
This setup requires that you give the Segments.ai AWS account read-only access to the data in your bucket. You can do this by granting us cross-account access through setting an appropriate bucket policy:
  1. 1.
    In your AWS account, go to the S3 Management Console.
  2. 2.
    Go to your bucket.
  3. 3.
    Go to the Permissions tab.
  4. 4.
    In the Bucket Policy section, click the Edit button.
  5. 5.
    Paste the following bucket policy and save your changes. Don't forget to replace YOUR_BUCKET_NAME with the name of your bucket.
1
{
2
"Version": "2012-10-17",
3
"Statement": [
4
{
5
"Sid": "segments-s3-access",
6
"Effect": "Allow",
7
"Principal": {
8
"AWS": "arn:aws:iam::931508227573:user/segmentsai-prod-user"
9
},
10
"Action": [
11
"s3:GetObject"
12
],
13
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME/*"
14
}
15
]
16
}
Copied!
If you run into any issues when setting up this integration, please contact us.

CORS configuration

You also need to configure CORS for your S3 bucket:
  1. 1.
    In your AWS account, go to the S3 Management Console.
  2. 2.
    Go to your bucket.
  3. 3.
    Go to the Permissions tab.
  4. 4.
    In the Cross-origin resource sharing (CORS) section, click the Edit button.
  5. 5.
    Paste the following configuration and save your changes.
1
[
2
{
3
"AllowedHeaders": [
4
"*"
5
],
6
"AllowedMethods": [
7
"GET"
8
],
9
"AllowedOrigins": [
10
"https://segments.ai"
11
],
12
"ExposeHeaders": []
13
}
14
]
Copied!

Google Cloud

Granting cross-account access

Please contact us to help you set this up.

CORS configuration

You also need to configure CORS for your Cloud Storage bucket, using this JSON file:
1
[
2
{
3
"origin": ["https://segments.ai"],
4
"method": ["GET"],
5
"responseHeader": [],
6
"maxAgeSeconds": 3600
7
}
8
]
Copied!

Azure

Please contact us to help you set this up.