Open HarshadRanganathan opened 3 years ago
This appears to be an issue with the plugin pulling the credentials from the instance. 2 questions:
This appears to be an issue with the plugin pulling the credentials from the instance. 2 questions:
- What type of security are you using for your Amazon Elasticsearch cluster? VPC/Internet, username/password or IAM auth?
- Can you post your logstash configuration file here? (With all identifying information or credentials removed of course)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "es:*",
"Resource": [
"arn:aws:es:us-east-1:<account-id>:domain/<es-domain>/*",
"arn:aws:es:us-east-1:<account-id>:domain/<es-domain>"
]
}
]
}
input {
kafka {
auto_offset_reset => "latest"
bootstrap_servers => ""
security_protocol => "SSL"
consumer_threads => 2
topics => [""]
decorate_events => true
max_poll_interval_ms => "2147483647"
max_poll_records => "100"
request_timeout_ms => "50000"
session_timeout_ms => "40000"
group_id => ""
codec => "json"
}
}
output {
amazon_es {
hosts => ["vpc-:443"]
region => "us-east-1"
ssl => true
index => ""
document_id =>""
}
}
Fine-grained access control -> Disabled SAML authentication -> Disabled Amazon Cognito for authentication -> Disabled
Gotcha. So if I am understanding correctly, you can actually use the regular logstash output plugin for Elasticsearch:
https://github.com/logstash-plugins/logstash-output-elasticsearch
This amazon-es plugin is needed if you are using IAM auth for access to your cluster, because it will add the credentials needed for IAM auth with an Amazon Elasticsearch Cluster.
Gotcha. So if I am understanding correctly, you can actually use the regular logstash output plugin for Elasticsearch:
https://github.com/logstash-plugins/logstash-output-elasticsearch
This amazon-es plugin is needed if you are using IAM auth for access to your cluster, because it will add the credentials needed for IAM auth with an Amazon Elasticsearch Cluster.
Yes, we could use it. But, we might want to use fine-grained access control with IAM master user for RBAC/Security/Kibana auth in the future.
Is the suggestion to go with logstash-output-elasticsearch
because we have ES in a VPC and that we don't necessarily need RBAC/Security/Kibana auth?
Also, all the requests need to be signed even if we use an open domain access policy (not v4 signature). I hope that's supported in the logstash-output-elasticsearch
plugin?
We've switched to logstash-output-elasticsearch
plugin. Will keep this ticket open as the plugin needs a fix for anyone planning to use IAM auth with IMDS v2.
Since logstash-output-elasticsearch
has added license compatibility checks, we're switching to Opensearch logstash plugin - https://opensearch.org/docs/latest/clients/logstash/index/
Logstash aws es output plugin is not working when IMDS v1 is disabled.
Logstash version: 7.6.1 Plugin version: 6.4.1
Error: