@@ -36,7 +36,7 @@ let report = function (event, context, responseStatus, physicalResourceId, respo
3636 StackId : event . StackId ,
3737 RequestId : event . RequestId ,
3838 LogicalResourceId : event . LogicalResourceId ,
39- Data : responseData
39+ Data : responseData ,
4040 } ) ;
4141
4242 const parsedUrl = new URL ( event . ResponseURL || defaultResponseURL ) ;
@@ -47,8 +47,8 @@ let report = function (event, context, responseStatus, physicalResourceId, respo
4747 method : 'PUT' ,
4848 headers : {
4949 'Content-Type' : '' ,
50- 'Content-Length' : responseBody . length
51- }
50+ 'Content-Length' : responseBody . length ,
51+ } ,
5252 } ;
5353
5454 https . request ( options )
@@ -92,7 +92,7 @@ const requestCertificate = async function (requestId, domainName, subjectAlterna
9292 DomainName : domainName ,
9393 SubjectAlternativeNames : subjectAlternativeNames ,
9494 IdempotencyToken : crypto . createHash ( 'sha256' ) . update ( requestId ) . digest ( 'hex' ) . substr ( 0 , 32 ) ,
95- ValidationMethod : 'DNS'
95+ ValidationMethod : 'DNS' ,
9696 } ) . promise ( ) ;
9797
9898 console . log ( `Certificate ARN: ${ reqCertResponse . CertificateArn } ` ) ;
@@ -103,7 +103,7 @@ const requestCertificate = async function (requestId, domainName, subjectAlterna
103103 let ready = false ;
104104 for ( let attempt = 0 ; attempt < maxAttempts && ! ready ; attempt ++ ) {
105105 const { Certificate } = await acm . describeCertificate ( {
106- CertificateArn : reqCertResponse . CertificateArn
106+ CertificateArn : reqCertResponse . CertificateArn ,
107107 } ) . promise ( ) ;
108108 options = Certificate . DomainValidationOptions || [ ] ;
109109
@@ -131,33 +131,33 @@ const requestCertificate = async function (requestId, domainName, subjectAlterna
131131 Type : record . Type ,
132132 TTL : 60 ,
133133 ResourceRecords : [ {
134- Value : record . Value
135- } ]
136- }
134+ Value : record . Value ,
135+ } ] ,
136+ } ,
137137 } ;
138- } )
138+ } ) ,
139139 } ,
140- HostedZoneId : hostedZoneId
140+ HostedZoneId : hostedZoneId ,
141141 } ) . promise ( ) ;
142142
143143 console . log ( 'Waiting for DNS records to commit...' ) ;
144144 await route53 . waitFor ( 'resourceRecordSetsChanged' , {
145145 // Wait up to 5 minutes
146146 $waiter : {
147147 delay : 30 ,
148- maxAttempts : 10
148+ maxAttempts : 10 ,
149149 } ,
150- Id : changeBatch . ChangeInfo . Id
150+ Id : changeBatch . ChangeInfo . Id ,
151151 } ) . promise ( ) ;
152152
153153 console . log ( 'Waiting for validation...' ) ;
154154 await acm . waitFor ( 'certificateValidated' , {
155155 // Wait up to 9 minutes and 30 seconds
156156 $waiter : {
157157 delay : 30 ,
158- maxAttempts : 19
158+ maxAttempts : 19 ,
159159 } ,
160- CertificateArn : reqCertResponse . CertificateArn
160+ CertificateArn : reqCertResponse . CertificateArn ,
161161 } ) . promise ( ) ;
162162
163163 return reqCertResponse . CertificateArn ;
@@ -178,7 +178,7 @@ const deleteCertificate = async function (arn, region) {
178178 let inUseByResources ;
179179 for ( let attempt = 0 ; attempt < maxAttempts ; attempt ++ ) {
180180 const { Certificate } = await acm . describeCertificate ( {
181- CertificateArn : arn
181+ CertificateArn : arn ,
182182 } ) . promise ( ) ;
183183
184184 inUseByResources = Certificate . InUseBy || [ ] ;
@@ -201,7 +201,7 @@ const deleteCertificate = async function (arn, region) {
201201 console . log ( `Deleting certificate ${ arn } ` ) ;
202202
203203 await acm . deleteCertificate ( {
204- CertificateArn : arn
204+ CertificateArn : arn ,
205205 } ) . promise ( ) ;
206206 } catch ( err ) {
207207 if ( err . name !== 'ResourceNotFoundException' ) {
0 commit comments