AWS provides a basic example for making signed requests to managed Elasticsearch clusters, but the example doesn't cover how to deal with EC2 instance profiles, which will require passing the session token.
Here's a simple example, which also handles authenticating when using an instance profile instead of a generated user level access key and secret, leverages the elastic bulk upload API to add multiple records at the same time, and threads the request so it can be made in a non-blocking fashion.