Skip to content

Commit

Permalink
fix(core): increase timeout for AcmCertificateImporter
Browse files Browse the repository at this point in the history
  • Loading branch information
ddneilson committed Jun 14, 2021
1 parent 99bfd1c commit 3f03beb
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/aws-rfdk/lib/core/lib/imported-acm-certificate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export class ImportedAcmCertificate extends Construct implements ICertificate {
layers: [ openSslLayer ],
retryAttempts: 0,
runtime: Runtime.NODEJS_12_X,
timeout: Duration.seconds(30),
timeout: Duration.minutes(5),
});

this.database.grantReadWriteData(lambda);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class AcmCertificateImporter extends DynamoBackedCustomResource {
const arn: string = resource.ARN;
let inUseByResources = [];
const backoffGenerator = new BackoffGenerator({
base: 200,
base: 1000,
jitterDivisor: 4,
maxAttempts,
});
Expand All @@ -97,6 +97,7 @@ export class AcmCertificateImporter extends DynamoBackedCustomResource {
inUseByResources = cert!.InUseBy || [];

if (inUseByResources.length) {
console.log(`Sleeping -- Resource ${arn} in use by ${inUseByResources.join(', ')}`);
await backoffGenerator.backoff();
} else {
break;
Expand Down
24 changes: 24 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,13 @@
"@aws-cdk/region-info" "1.106.1"
constructs "^3.3.69"

"@aws-cdk/aws-imagebuilder@1.106.1":
version "1.106.1"
resolved "https://registry.yarnpkg.com/@aws-cdk/aws-imagebuilder/-/aws-imagebuilder-1.106.1.tgz#9edfe273fef70d3492bcb531060dfb2e0f5791ab"
integrity sha512-CbLmphLfOtpKACiKEEXtXHU/aEB69mMUp5nOe+AbgEB8HbELfFrybHNdzXqF9YYauZJ3rLutDWDupOAX0oaQDw==
dependencies:
"@aws-cdk/core" "1.106.1"

"@aws-cdk/aws-kinesis@1.106.1":
version "1.106.1"
resolved "https://registry.yarnpkg.com/@aws-cdk/aws-kinesis/-/aws-kinesis-1.106.1.tgz#52989ea05c0477c1fdbfce0ca0f0c15b48a7d8dd"
Expand Down Expand Up @@ -4029,6 +4036,11 @@ crc32-stream@^4.0.1:
crc-32 "^1.2.0"
readable-stream "^3.4.0"

create-require@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==

cross-spawn@^4:
version "4.0.2"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
Expand Down Expand Up @@ -10498,6 +10510,18 @@ ts-node@^8.0.2:
source-map-support "^0.5.17"
yn "3.1.1"

ts-node@^9.1.1:
version "9.1.1"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d"
integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==
dependencies:
arg "^4.1.0"
create-require "^1.1.0"
diff "^4.0.1"
make-error "^1.1.1"
source-map-support "^0.5.17"
yn "3.1.1"

tsame@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/tsame/-/tsame-2.0.1.tgz#70410ddbefcd29c61e2d68549b3347b0444d613f"
Expand Down

0 comments on commit 3f03beb

Please sign in to comment.