[英]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.