-
-
Save lalitlogical/d00b01273f228c873af4a02777719ea0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ELASTICSEARCH_URL=https://**** | |
AWS_REGION=**** | |
AWS_ACCESS_KEY_ID=**** | |
AWS_SECRET_ACCESS_KEY=**** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": "***.***.***.***" | |
} | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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