Postman AWS S3 snapshot request Elasticsearch Postman AWS S3 snapshot request Elasticsearch elasticsearch elasticsearch

Postman AWS S3 snapshot request Elasticsearch


It looks like you are not passing AWS credentials with this request.

There is a detailed guide how to make a Postman request with AWS authentication here: Use Postman to Call an API.

Your Postman window might look like this:

AWS Postman auth

To do the same from python please check out Sample python client section of this documentation page, note that AWS4Auth object is created and it's passed as auth parameter to requests.put():

credentials = boto3.Session().get_credentials()awsauth = AWS4Auth(credentials.access_key, credentials.secret_key, region, service, session_token=credentials.token)# Register repositorypath = '_snapshot/my-snapshot-repo' # the Elasticsearch API endpointurl = host + pathpayload = {  ...}headers = {"Content-Type": "application/json"}r = requests.put(url, auth=awsauth, json=payload, headers=headers)

Hope that helps!