将AWS Firehose交付到VPC中的交叉帐户Elasticsearch

问题描述 投票:0回答:1

我在帐户A中运行的VPC中有一个Elasticsearch。

我想将日志从帐户B中的Firehose传递到帐户A中的Elasticsearch。

有可能吗?

[当我尝试从AWS CLI创建交付流时,出现异常,

$: /usr/local/bin/aws firehose create-delivery-stream --cli-input-json file://input.json --profile devops
An error occurred (InvalidArgumentException) when calling the CreateDeliveryStream operation: Verify that the IAM role has access to the ElasticSearch domain.

修改为帐户B中的Elasticsearch时,具有相同的IAM角色和相同的input.json。

添加我完整的Terraform代码:https://gist.github.com/karthikeayan/a67e93b4937a7958716dfecaa6ff7767

amazon-web-services elasticsearch amazon-kinesis amazon-kinesis-firehose aws-elasticsearch
1个回答
0
投票

看来您没有授予创建流时使用的角色的足够权限(从CLI示例中提供,我猜测其角色名为'devops')。至少您需要firehose: CreateDeliveryStream

我建议为您的角色添加以下权限:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "firehose:PutRecord",
                "firehose:CreateDeliveryStream",
                "firehose:UpdateDestination"
            ],
            "Resource": "*"
        }
    ]
}
© www.soinside.com 2019 - 2024. All rights reserved.