Service endpoint_url from config file ignored #5779
Labels
bug
This issue is a bug.
needs-review
This issue or PR needs review from the team.
p2
This is a standard priority issue
Describe the bug
In order to use the least environment variables possible with localstack, I created the following profile:
Regression Issue
Expected Behavior
Be able to use the endpoint_url from config file instead of the AWS_ENDPOINT_URL_S3 environment variable
Current Behavior
Since the endpoint_url from config is not being used, if I don't set AWS_ENDPOINT_URL_S3 I get this at localstack:
File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/aws/protocol/parser.py", line 779, in _parse_xml_string_to_dom
raise ProtocolParserError(
localstack.aws.protocol.parser.ProtocolParserError: Unable to parse request (not well-formed (invalid token): line 1, column 0), invalid XML received:
b'{"sourceId":"1","eventDateTime":"2024-11-14T12:13:18.6870-03:00","code":"1 ","sourceApplicationId":1,"display":"TESTE","active":"true "}'
(Service: S3, Status Code: 500, Request ID: 4d0a9fbd-6893-4f2d-9f55-138ddb31fbd6, Extended Request ID: s9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=)
Suppressed: software.amazon.awssdk.core.exception.SdkClientException: Request attempt 2 failure: exception while calling s3 with unknown operation: Traceback (most recent call last):
File "/opt/code/localstack/.venv/lib/python3.11/site-packages/localstack/aws/protocol/parser.py", line 776, in _parse_xml_string_to_dom
parser.feed(xml_string)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0
Reproduction Steps
set AWS_PROFILE=localstack and use S3AsyncClient
Possible Solution
No response
Additional Information/Context
localstack version: 4
AWS Java SDK version used
2.29.47
JDK version used
openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30) OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)
Operating System and version
Linux Mint 22
The text was updated successfully, but these errors were encountered: