Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to aws organization formation will be documented in this fil
**BREAKING CHANGES**:
- v1.0.0: execution role under which org-formation is ran requires the ec2:describeRegions permission


**version: 1.0.18**
- fix: improved backoff for account creation and type registration

**version: 1.0.16**
- fix: access denied issue when running init-pipeline passing --build-account-id as an argument

Expand Down
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.17-beta.2",
"version": "1.0.18",
"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/aws-provider/aws-organization-writer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Organizations from '@aws-sdk/client-organizations';
import * as IAM from '@aws-sdk/client-iam';
import { CreateCaseCommand } from '@aws-sdk/client-support';
import { STSServiceException } from '@aws-sdk/client-sts';

Check warning on line 4 in src/aws-provider/aws-organization-writer.ts

View workflow job for this annotation

GitHub Actions / test

'STSServiceException' is defined but never used
import { AwsUtil, passwordPolicyEquals } from '../util/aws-util';
import { ConsoleUtil } from '../util/console-util';
import { OrgFormationError } from '../org-formation-error';
Expand Down Expand Up @@ -336,10 +336,10 @@
try {
await this.updateAccount(resource, accountId);
} catch (err) {
if ((err.name === 'AccessDenied' || err.name === 'InvalidClientTokenId') && retryCountAccessDenied < 3) {
if ((err.name === 'AccessDenied' || err.name === 'InvalidClientTokenId' || err.name === 'RegionDisabledException') && retryCountAccessDenied < 3) {
shouldRetry = true;
retryCountAccessDenied = retryCountAccessDenied + 1;
await sleep(3000);
await sleep(6000);
continue;
}
throw err;
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/impl/rp-build-task-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ const retryTypeRegistrationWrapper = async (type: string, fn: () => Promise<any>
await fn();
} catch (err) {
const message = err.message as string;
if (message && -1 !== message.indexOf('Deployment is currently in DEPLOY_STAGE of status FAILED')) {
if (message && -1 !== message.indexOf('Rate exceeded on Registry APIs')) {
if (retryCount >= 20) {
throw err;
}

ConsoleUtil.LogInfo(`Type registration ${type} is in DEPLOY_STAGE of status FAILED. waiting.... `);
ConsoleUtil.LogInfo(`Type registration ${type} Rate exceeded on Registry APIs. waiting.... `);
retryCount += 1;
await sleep(1000 * (26 + (4 * Math.random())));
retryTypeRegistration = true;
Expand Down
Loading