Issue
You are attempting to send a test event or run a sync to an AWS S3 (Actions) destination in Segment, but the operation fails with an Access Denied error. This error occurs when Segment tries to assume the specified AWS Identity and Access Management (IAM) role.
Product
Twilio Segment
Environment
Segment Console
Cause
This issue occurs when the External ID configured within your Segment destination settings does not match the sts:ExternalId condition defined in your AWS IAM role's trust policy. AWS requires these values to match exactly for the AssumeRole operation to succeed.
Resolution
To resolve this issue, ensure that the External ID matches exactly between Segment and AWS by following these steps:
Log in to your AWS Management Console and navigate to the IAM service.
Select Roles and click on the specific IAM role configured for your Segment destination.
Open the Trust relationships tab and review the value specified for the
sts:ExternalIdcondition.Log in to your Segment workspace and navigate to your S3 (Actions) Destination.
Go to the destination settings page where the connection details are defined.
Locate the External ID field and update it to match the exact string found in your AWS trust policy.
Save the changes in Segment and attempt to send a test event to verify the connection is successful.
Additional Information
For more details on configuring this destination, see the Segment product documentation here.