- Newest
- Most votes
- Most comments
When creating a service role for Amazon Kinesis Data Firehose with an external ID condition, you need to use your AWS account ID as the external ID value. This is a specific requirement for Firehose service roles.
Based on your experience, you've already discovered that using your AWS account number as the external ID works, while custom values like "abcd1234dcba" do not. This is because Firehose is designed to automatically use the account ID as the external ID when assuming the role.
In the trust policy for Firehose, the correct approach is to set the external ID to your AWS account number (in your case, "111111111111") as shown in this example:
{
"Statement": {
"Effect": "Allow",
"Principal": {
"Service": "firehose.amazonaws.com"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "111111111111"
}
}
}
}
The external ID condition helps prevent the confused deputy problem by ensuring that the service can only assume the role when acting on behalf of your specific account. For Firehose specifically, the service is designed to use your account ID as this identifier when making the AssumeRole API call.
Sources
Step 1: Create a Firehose delivery stream - Amazon CloudWatch Logs
Step 1: Create a Firehose delivery stream - Amazon CloudWatch Logs
Access to AWS accounts owned by third parties - AWS Identity and Access Management
