8000 fix S3 endpoints (#102) · localstack/localstack-java-utils@c64325e · GitHub
[go: up one dir, main page]

Skip to content

Commit c64325e

Browse files
authored
fix S3 endpoints (#102)
1 parent 6bc22d6 commit c64325e

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Simply add the following dependency to your `pom.xml` file:
6060
<dependency>
6161
<groupId>cloud.localstack</groupId>
6262
<artifactId>localstack-utils</artifactId>
63-
<version>0.2.22</version>
63+
<version>0.2.23</version>
6464
</dependency>
6565
```
6666

@@ -112,6 +112,7 @@ To publish a release of the library, the "Maven Release" Github Action can be ma
112112

113113
## Change Log
114114

115+
* v0.2.23: Fix S3 endpoints to be compatible with LocalStack v2
115116
* v0.2.22: Fix sqs event mapping for new event format, some test fixes
116117
* v0.2.21: Bump version of AWS SDK v1; add AWS SDK v2 sync clients to TestUtils; add docker executable path under homebrew
117118
* v0.2.20: Fix extracting container logs for LocalStack startup check

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>cloud.localstack</groupId>
55
<artifactId>localstack-utils</artifactId>
66
<packaging>jar</packaging>
7-
<version>0.2.22</version>
7+
<version>0.2.23</version>
88
<name>localstack-utils</name>
99

1010
<description>Java utilities for the LocalStack platform.</description>

src/main/java/cloud/localstack/Constants.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public class Constants {
88

99
public static final String LOCALHOST_DOMAIN_NAME = "localhost.localstack.cloud";
1010

11+
public static final String S3_LOCALHOST_DOMAIN_NAME = "s3.localhost.localstack.cloud";
12+
1113
public static final String DEFAULT_AWS_ACCOUNT_ID = "000000000000";
1214

1315
public static final String ENV_LOCALSTACK_API_KEY = "LOCALSTACK_API_KEY";

src/main/java/cloud/localstack/Localstack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public String getEndpointS3() {
176176
* <bucket-name>.localhost, but that name cannot be resolved (unless hardcoded
177177
* in /etc/hosts)
178178
*/
179-
s3Endpoint = s3Endpoint.replace("localhost", Constants.LOCALHOST_DOMAIN_NAME);
179+
s3Endpoint = s3Endpoint.replace("localhost", Constants.S3_LOCALHOST_DOMAIN_NAME);
180180
return s3Endpoint;
181181
}
182182

src/main/java/cloud/localstack/deprecated/Localstack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public static String getEndpointS3(boolean overrideSSL) {
131131
* which by default would result in <bucket-name>.localhost, but that name cannot be resolved
132132
* (unless hardcoded in /etc/hosts)
133133
*/
134-
s3Endpoint = s3Endpoint.replace("localhost", Constants.LOCALHOST_DOMAIN_NAME);
134+
s3Endpoint = s3Endpoint.replace("localhost", Constants.S3_LOCALHOST_DOMAIN_NAME);
135135
return s3Endpoint;
136136
}
137137

0 commit comments

Comments
 (0)
0