Skip to content

Instantly share code, notes, and snippets.

@lalitlogical
Last active June 22, 2019 06:32
Show Gist options
  • Save lalitlogical/d00b01273f228c873af4a02777719ea0 to your computer and use it in GitHub Desktop.
Save lalitlogical/d00b01273f228c873af4a02777719ea0 to your computer and use it in GitHub Desktop.
ELASTICSEARCH_URL=https://****
AWS_REGION=****
AWS_ACCESS_KEY_ID=****
AWS_SECRET_ACCESS_KEY=****
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::XXXXXXXX:user/XXXXXXXX"
},
"Action": "es:*",
"Resource": "arn:aws:es:us-east-2:XXXXXXXX:domain/XXXXXXXX/*"
},
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "es:*",
"Resource": "arn:aws:es:us-east-2:XXXXXXXX:domain/XXXXXXXX/*",
"Condition": {
"IpAddress": {
"aws:SourceIp": "***.***.***.***"
}
}
}
]
}
if ENV['ELASTICSEARCH_URL'].present?
Searchkick.aws_credentials = {
access_key_id: ENV['AWS_ACCESS_KEY_ID'],
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
region: ENV['AWS_REGION']
}
end
gem 'elasticsearch', '~> 6.2.0'
gem 'searchkick', '~> 3.1'
gem 'faraday_middleware-aws-sigv4', '~> 0.2.4'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment