Abstract away service name (#268)
* Abstract away service name Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Compuute x-amz-content-256 header Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Fix async signing Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Adds types-six to dependencies Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Optionally remove Content-Length Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Fix dict typo Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Remove requirement for x-amz-content-sha256 header Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Remove deletion of content-length Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Fix capitalization Signed-off-by: Harsha Vamsi Kalluri <[email protected]> * Adding unit tests Signed-off-by: Harsha Vamsi Kalluri <[email protected]> Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
This commit is contained in:
+4
-2
@@ -407,8 +407,9 @@ import boto3
|
||||
|
||||
host = '' # cluster endpoint, for example: my-test-domain.us-east-1.es.amazonaws.com
|
||||
region = 'us-west-2'
|
||||
service = 'es' # 'aoss' for OpenSearch Serverless
|
||||
credentials = boto3.Session().get_credentials()
|
||||
auth = AWSV4SignerAuth(credentials, region)
|
||||
auth = AWSV4SignerAuth(credentials, region, service)
|
||||
index_name = 'python-test-index3'
|
||||
|
||||
client = OpenSearch(
|
||||
@@ -450,8 +451,9 @@ import boto3
|
||||
|
||||
host = '' # cluster endpoint, for example: my-test-domain.us-east-1.es.amazonaws.com
|
||||
region = 'us-west-2'
|
||||
service = 'es' # 'aoss' for OpenSearch Serverless
|
||||
credentials = boto3.Session().get_credentials()
|
||||
auth = AWSV4SignerAsyncAuth(credentials, region)
|
||||
auth = AWSV4SignerAsyncAuth(credentials, region, service)
|
||||
index_name = 'python-test-index3'
|
||||
|
||||
client = OpenSearch(
|
||||
|
||||
Reference in New Issue
Block a user