Skip to content

Commit

Permalink
set s3ForcePathStyle for S3 client in SFn internal SDK (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
whummer committed Feb 1, 2023
1 parent 4bdccd1 commit 6f56dd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file modified stepfunctions-internal-awssdk/awssdk.zip
Binary file not shown.
8 changes: 6 additions & 2 deletions stepfunctions-internal-awssdk/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,18 @@ var handler = async ({ service, operation, params, region }) => {
if (serviceKey) {
try {
const service2 = Reflect.get(AWS, serviceKey);
const client = new service2({
const config = {
endpoint,
region,
credentials: {
accessKeyId: "test",
secretAccessKey: "test"
}
});
}
if (serviceKey.toLowerCase() === "s3") {
config.s3ForcePathStyle = true;
}
const client = new service2(config);
const fn = Reflect.get(client, operation);
const response = Reflect.apply(fn, client, [params]);
const result = await response.promise();
Expand Down

0 comments on commit 6f56dd5

Please sign in to comment.