Skip to content

Commit 6f56dd5

Browse files
authored
set s3ForcePathStyle for S3 client in SFn internal SDK (#13)
1 parent 4bdccd1 commit 6f56dd5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
39 Bytes
Binary file not shown.

stepfunctions-internal-awssdk/src/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,18 @@ var handler = async ({ service, operation, params, region }) => {
3535
if (serviceKey) {
3636
try {
3737
const service2 = Reflect.get(AWS, serviceKey);
38-
const client = new service2({
38+
const config = {
3939
endpoint,
4040
region,
4141
credentials: {
4242
accessKeyId: "test",
4343
secretAccessKey: "test"
4444
}
45-
});
45+
}
46+
if (serviceKey.toLowerCase() === "s3") {
47+
config.s3ForcePathStyle = true;
48+
}
49+
const client = new service2(config);
4650
const fn = Reflect.get(client, operation);
4751
const response = Reflect.apply(fn, client, [params]);
4852
const result = await response.promise();

0 commit comments

Comments
 (0)