Skip to content

Bulk indexing command line tool for AWS ElasticSearch/Opensearch

License

Notifications You must be signed in to change notification settings

shmuelgutman/awsesbulk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

awsesbulk

Bulk indexing command line tool for AWS ElasticSearch/Opensearch

This is a simple wrapper around elasticsearch Bulk API.
It reads the input data from the stdin and hence, can be easily utilized the pipe | pattern.

If your aws elasticsearch domain is configured with IAM access policy, this tool also properly sign the request for you. The credentials are calculated the same way it works in AWS-SDK.

Installation
npm i -g awsesbulk

The input data can be csv-formatted or using a newline delimited JSON (NDJSON).

CSV:

cat some_very_big_file.csv | awsesbulk --endpoint $ecsendpoint --index $indexname --region us-east-1 --csv

NDJSON:

echo '{"foo": "bar"}\n{"foo1":"bar1"}\n' | awsesbulk --endpoint $ecsendpoint --index $indexname --region us-east-1

Use the --help to view additional options

About

Bulk indexing command line tool for AWS ElasticSearch/Opensearch

Resources

License

Stars

Watchers

Forks

Packages

No packages published