diff --git a/packages/aws/src/clients/cloudformation.client.ts b/packages/aws/src/clients/cloudformation.client.ts index eb7d9134f..2119873d4 100644 --- a/packages/aws/src/clients/cloudformation.client.ts +++ b/packages/aws/src/clients/cloudformation.client.ts @@ -215,17 +215,12 @@ export class CloudformationClient implements CloudformationClientInterface { * @param input The input to describe a change set. * @param retryNumber */ - async describeChangeSet(input: DescribeChangeSetCommandInput, retryNumber = 0): Promise { + async describeChangeSet(input: DescribeChangeSetCommandInput): Promise { this.logHandler.debug("CLOUDFORMATION CLIENT - Describe Change Set", {input}, AwsModuleKeyname); const command = new DescribeChangeSetCommand(input) try { return await this.getClient().send(command); } catch (e) { - if(e.code === "Throttling" && retryNumber < 3) { - await new Promise(resolve => setTimeout(resolve, (retryNumber + 1) * 1000)); - - return this.describeChangeSet(input, retryNumber++); - } this.logHandler.error("Error describing change set in cloudformation", {error: e}, AwsModuleKeyname); throw e; } @@ -236,17 +231,12 @@ export class CloudformationClient implements CloudformationClientInterface { * @param input The input to execute a change set. * @param retryNumber */ - async executeChangeSet(input: ExecuteChangeSetCommandInput, retryNumber = 0): Promise { + async executeChangeSet(input: ExecuteChangeSetCommandInput): Promise { this.logHandler.debug("CLOUDFORMATION CLIENT - Execute Change Set", {input}, AwsModuleKeyname); const command = new ExecuteChangeSetCommand(input) try { return await this.getClient().send(command); } catch (e) { - if(e.code === "Throttling" && retryNumber < 3) { - await new Promise(resolve => setTimeout(resolve, (retryNumber + 1) * 1000)); - - return this.executeChangeSet(input, retryNumber++); - } this.logHandler.error("Error executing change set in cloudformation", {error: e}, AwsModuleKeyname); throw e; } @@ -364,7 +354,7 @@ export class CloudformationClient implements CloudformationClientInterface { if (statusCallback) { statusCallback(CloudformationDeploymentStatusEnum.InProgress, changeSetName); } - continue; + break; case ExecutionStatus.EXECUTE_COMPLETE: case ChangeSetStatus.CREATE_COMPLETE: