Skip to content

Commit

Permalink
fix: look up bucket region for large templates
Browse files Browse the repository at this point in the history
  • Loading branch information
OlafConijn committed Dec 4, 2023
1 parent e1f5f80 commit be080e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-organization-formation",
"version": "1.0.12-beta.4",
"version": "1.0.12-beta.6",
"description": "Infrastructure as code solution for AWS Organizations",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/util/aws-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export class AwsUtil {
return await provider();
}

private static GetCredentialProviderWithRoleAssumptions(clientConfig: ServiceClientBinding): { cacheKey: ServiceCacheKey; provider: Provider<AwsCredentialIdentity>; serviceClientBinding: ServiceClientBinding } {
private static GetCredentialProviderWithRoleAssumptions(clientConfig: ServiceClientBinding): { cacheKey: ServiceCacheKey; provider: Provider<AwsCredentialIdentity>; serviceClientBinding: ServiceClientBinding; } {

Check failure on line 492 in src/util/aws-util.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected separator (;)

Check failure on line 492 in src/util/aws-util.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected separator (;)

Check failure on line 492 in src/util/aws-util.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected separator (;)
let providerToReturn = AwsUtil.credentialsProvider;
const { isPartition, accountId, roleInTargetAccount, viaRoleArn, region: regionFromClientConfig } = clientConfig;

Expand Down Expand Up @@ -738,7 +738,7 @@ export class CfnUtil {
}
const putObjectRequest: PutObjectCommandInput = { Bucket: bucketName, Key: `${stackName}-${templateHash}.json`, Body: stackInput.TemplateBody, ACL: 'bucket-owner-full-control' };
await s3Service.send(new PutObjectCommand(putObjectRequest));
stackInput.TemplateURL = `https://${bucketName}.s3-${binding.region}.amazonaws.com/${putObjectRequest.Key}`;
stackInput.TemplateURL = `https://${bucketName}.s3.${binding.region}.amazonaws.com/${putObjectRequest.Key}`;
delete stackInput.TemplateBody;
}
}
Expand Down

0 comments on commit be080e7

Please sign in to comment.