[英]AWS: reading Kinesis Stream data using Kinesis Firehose in a different account
[英]Unable to Stream events from AWS Pinpoint to Kinesis data Firehose present in different AWS accounts
我在賬戶 A 中有 AWS Pinpoint,在賬戶 B 中有 Kinesis Data Firehose,它將數據存儲在賬戶 B 的 S3 中。有一個選項可以將 stream 事件直接定位到 Kinesis Streams(我在我的用例中使用 Firehose。) . 但是使用 AWS 控制台,賬戶 B 中存在的 Firehose ZF7B44CFFAFD5C52223D5498196C8A2E7BZ 未列在賬戶 A 中以生成連接。
所以我嘗試使用 IAM Assume Role 進行跨賬戶訪問。 我在賬戶 A(Pinpoint)中創建了 RoleA,在賬戶 B(Firehose)中創建了 RoleB
RoleB - 身份策略
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"firehose:PutRecordBatch",
"firehose:DescribeDeliveryStream"
],
"Resource": [
"arn:aws:firehose:*region*:*AccountB_id*:deliverystream/*FirehoseStreamName*"
]
}
]
}
RoleB - 信任策略
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::*AccountA_id*:role/*RoleA*"
]
},
"Action": "sts:AssumeRole"
}
]
}
RoleA-身份策略
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::*AccountB_id*/*RoleB*"
}
}
由於無法使用控制台連接 firehose 和 pinpoint 我使用了 AWS CLI 並收到錯誤
aws-cli 命令
aws pinpoint put-event-stream --application-id *accA-pinpoint-project-id* --write-event-stream '{"DestinationStreamArn": "*accB-firehose-arn*", "RoleArn": "*accA-role-arn*"}' --profile *accA-profile*
錯誤
An error occurred (BadRequestException) when calling the PutEventStream operation: Destination stream validation failed. Check Destination and Role ARN values and make sure the IAM Role is configured correctly.
因此,如果有人在這兩個服務之間完成了跨帳戶連接,請幫助我。
嘿,看起來不可能在兩個不同帳戶中的 pinpoint 和 firehose 之間創建跨帳戶連接。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.