Closed
Description
Elasticsearch version (bin/elasticsearch --version
): 5.6.2
Plugins installed: [repository-s3]
JVM version (java -version
): Doesn't seem to matter
OS version (uname -a
if on a Unix-like system): Doesn't seem to matter
Description of the problem including expected versus actual behavior:
When using the repository-s3 plugin from within an ECS Task that has an ECS Task IAM role
, the repository-s3 instead loads the underlying ec2 host's credentials, which appears to be contrary (or at least unexpected!), based on what is in the usage guide
Steps to reproduce:
- Install elasticsearch 5.6.2 on a docker container
- Use docker container in a task definition on AWS ECS
- Give task definition an IAM role with access to an s3 bucket
- Give EC2 instance an IAM role that denies access to s3 bucket
- Install repository-s3 plugin using
elasticsearch-plugin install repository-s3
- Start elasticsearch
- Attempt to create a repository using as specified at https://www.elastic.co/guide/en/elasticsearch/plugins/5.6/repository-s3-repository.html#repository-s3-repository, which fails.
- Note that the aws cli is, however able to access the s3 bucket from inside the container correctly (e.g., aws s3 ls s3::/<BUCKET_NAME> works).
Believed cause:
I believe I've tracked the issue down to