---
title: "Upload Segments to S3"
canonical: "https://hub.freewheel.tv/space/BC/115081594/Upload%20Segments%20to%20S3"
format: markdown
---
Overview If a segment file is over 10 Mb in size, the file needs to be uploaded to a Beeswax S3 bucket. Follow the instructions below for this process. Segment S3 Upload Instructions for Buyer Cloud Provide IAM ARN Give your account representative your AWS Identity & Access Management (IAM) Amazon Resource Name (ARN). Refer to  AWS documentation  for details. Use only "user" or "role" ARNs, not "group" or "root". Wait for Confirmation FreeWheel will notify you when your permissions have been added to the bucket policy. Do not upload files before receiving this notification. Apply ACL Policy FreeWheel will provide an ACL policy for your user {
"Sid": "AllowAssumeBeeswaxRole", 
"Effect": "Allow", 
"Action": "sts:AssumeRole", 
"Resource": "arn:aws:iam::164891057361:role/customer-s3-user-list-dsp-<dsp_account_id>"
}   Replace  <dsp_account_id>  with your Buyer Cloud account ID. Assume Role Assume the role from your ACL policy to access the Beeswax S3 bucket. Create a new profile in  ~/.aws/config  using your AWS user to assume the specified role. Refer to  AWS CLI documentation  for details. Upload Segment File Upload to:  s3://beeswax-data-us-east-1/user-list/dsp/<dsp_account_id>/ Format the file according to the instructions in  Segment Uploads . Use  --profile  option with the profile created in step 4. Include the forward-slash at the end of the bucket path to avoid "Access Denied" errors. For EMEA or APAC, use  beeswax-data-eu-west-1  or  beeswax-data-ap-northeast-1  respectively. Set File Permissions Run this AWS CLI command:   aws s3api put-object-acl \ --profile <assumeBeeswaxRoleProfile> \ --bucket beeswax-data-us-east-1 \ --key user-list/dsp/<dsp_account_id>/file_name.txt \ --acl bucket-owner-full-control \ --region us-east-1  Replace placeholders with your actual values. Adjust bucket and region for EMEA or APAC uploads. Execute Segment Upload API Call Make a POST call to the Buzz API:   curl -X POST "https://dsp.api.beeswax.com/rest/segment_upload" -b cookies.txt -d '{"segment_file_list":["s3://beeswax-data-us-east-1/user-list/dsp/<dsp_account_id>/file_name.txt"],"account_id":<dsp_account_id>,"file_format":"DELIMITED","user_id_type":"OTHER_MOBILE_ID","segment_key_type":"DEFAULT"}'  Replace  <dsp_account_id>  with your Buyer Cloud account ID. For EMEA uploads, include  "continent":"EMEA"  in the payload. Track Progress Monitor the file processing in the Segment Uploads screen of the UI. There are three options for the continent field: NAM, EMEA, APAC.  When the continent field is not passed then it will default to NAM.  Segment S3 Upload Instructions for Custom Buyer Cloud Setups Provide IAM ARN Give your account representative your AWS Identity & Access Management (IAM) Amazon Resource Name (ARN). Refer to  AWS documentation  for details. Use only "user" or "role" ARNs, not "group" or "root". Wait for Confirmation FreeWheel will notify you when your permissions have been added to the bucket policy. Do not upload files before receiving this notification. Apply ACL Policy FreeWheel will provide an ACL policy for your user: {
    "Sid": "AllowAssumeBeeswaxRole",
    "Effect": "Allow",
    "Action": "sts:AssumeRole",
    "Resource": "arn:aws:iam::164891057361:role/customer-s3-user-list-<customer_buzz_key>"
} Replace  <customer_buzz_key>  with your actual buzz key. Assume Role Assume the role from your ACL policy to access the Beeswax S3 bucket. Create a new profile in  ~/.aws/config  using your AWS user to assume the specified role. Refer to  AWS CLI documentation  for details. Upload Segment File Upload to:  s3://beeswax-data-us-east-1/user-list/<customer_buzz_key>/ Format the file according to the  Segment Uploads instructions . Use  --profile  option with the profile created in step 4. Include the forward-slash at the end of the bucket path to avoid "Access Denied" errors. For EMEA or APAC, use  beeswax-data-eu-west-1  or  beeswax-data-ap-northeast-1  respectively. Set File Permissions Run this AWS CLI command:   aws s3api put-object-acl \ --profile <assumeBeeswaxRoleProfile> \ --bucket beeswax-data-us-east-1 \ --key user-list/<customer_buzz_key>/file_name.txt \ --acl bucket-owner-full-control \ --region us-east-1  Replace placeholders with your actual values. Adjust bucket and region for EMEA or APAC uploads. Execute Segment Upload API Call Make a POST call to the Buzz API:   curl -X POST "https://<customer_buzz_key>.api.beeswax.com/rest/segment_upload" -b cookies.txt -d '{"segment_file_list":["s3://beeswax-data-us-east-1/user-list/<customer_buzz_key>/file_name.txt"],"account_id":2,"file_format":"DELIMITED","user_id_type":"OTHER_MOBILE_ID","segment_key_type":"DEFAULT"}'  Replace  <customer_buzz_key>  and  account_id  as needed. For EMEA uploads, include  "continent":"EMEA"  in the payload. Track Progress Monitor the file processing in the Segment Uploads screen of the UI. There are three options for the continent field: NAM, EMEA, APAC.  When the continent field is not passed then it will default to NAM.  Resources For more information, see: Segment Upload API Reference Segment Upload POST Call Details