我在帐户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
看来您没有授予创建流时使用的角色的足够权限(从CLI示例中提供,我猜测其角色名为'devops')。至少您需要firehose: CreateDeliveryStream
。
我建议为您的角色添加以下权限:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"firehose:PutRecord",
"firehose:CreateDeliveryStream",
"firehose:UpdateDestination"
],
"Resource": "*"
}
]
}