AWS Elasticsearch Service signed requests
marcelolebre opened this issue · 7 comments
I’m currently using elasticsearch-elixir and I extended Elasticsearch.API to use AWS Elasticsearch Service with signed requests. I wonder if this is a feature you’d like to include in this project, I could make a PR if interested. What do you think?
Sure, I'd love to see a PR for this.
Closed with #67.
Hey ya! Having a potential issue with this, but I'm also not a seasoned Elixir guy and this is the first time I've touched ES :P
So I have this in my config.exs:
# AWS Elasticsearch Config
config :ef_api, EfAPI.ElasticsearchCluster,
json_library: Jason,
api: Elasticsearch.API.AWS,
url:
"CENSORED_BECAUSE_MAYBE_SENSITIVE?",
default_options: [
aws: [
region: "us-west-1",
service: "es",
access_key_id: System.get_env("AWS_ACCESS_KEY_ID"),
secret_access_key: System.get_env("AWS_SECRET_ACCESS_KEY")
]
],
indexes: %{
food_items: %{
settings: "priv/elasticsearch/food_items.json",
store: EfAPI.ElasticsearchStore,
sources: [EfAPI.Data.FoodItem],
bulk_page_size: 5000,
bulk_wait_interval: 0
}
}
and I just get
** (Mix) Could not start application ef_api: EfAPI.Application.start(:normal, []) returned an error: shutdown: failed to start child: EfAPI.ElasticsearchCluster
** (EXIT) %{api: [{"must be valid", [validation: :by]}]}
I've tried taking out the url
, removing the default_options
without much luck. Any help is appreciated! (I'm not using a local ES instance yet, just one on AWS)
@ksherman did you update with the last version?
Also, your vars are incorrect:
access_key_id -> access_key
secret_access_key -> secret
Ha, silly me, fixed that. I copied that block from ex_aws :P
I think I have the latest, I just added it to the project yesterday. Looking through the files in deps, the changelog.md doesn't match what's in the repo, so I guess I'm not totally sure its the most current version?
I think I have it,
d0348e4#diff-6023be6004fce4718dad3dafb576d258R64
sigaws
is optional in the dependencies but d0348e4#diff-19703e7a50e851dc833748d4764eb07bR1 wrapped it in a conditional expecting that dependency?
adding sigaws seems to have got it working!