From 5b38bc5f3e954298c27a1895578390398f968814 Mon Sep 17 00:00:00 2001 From: Dominik Schubert Date: Thu, 28 Dec 2023 10:53:18 +0100 Subject: [PATCH] Fall back to STS endpoint url as default (#80) --- README.md | 1 + bin/awslocal | 4 +++- setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6455428..c3514bd 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ pip install https://github.com/boto/botocore/archive/v2.zip https://github.com/a ## Change Log +* v0.22.0: Use fallback for endpoint detection. Should prevent most cases of `Unable to find LocalStack endpoint for service ...` * v0.21.1: Introducing semantic versioning and list of services without endpoints * v0.21: Use placeholder credentials and region only if Boto cannot not find them, fix output streaming for logs tail call * v0.20: Small fixes for Python 2.x backward compatibility diff --git a/bin/awslocal b/bin/awslocal index 7eeb273..59fc73f 100755 --- a/bin/awslocal +++ b/bin/awslocal @@ -50,7 +50,9 @@ def get_service_endpoint(localstack_host=None): if service == 's3api': service = 's3' endpoints = config.get_service_endpoints(localstack_host=localstack_host) - return endpoints.get(service) + # defaulting to use the endpoint for STS (could also be one of the other services in the existing list) + # otherwise newly-added services in LocalStack would always need to be added to the _service_ports dict in localstack_client + return endpoints.get(service) or endpoints.get("sts") def usage(): diff --git a/setup.py b/setup.py index b44a824..52f390d 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name='awscli-local', - version='0.21.1', + version='0.22.0', description=description, long_description=README, long_description_content_type='text/markdown',