title: How to solve : "Received response status [FAILED] from custom resource. Message returned: Resource is not in the state certificateValidated"? CDK
body: <p>I have the following error trying to create a static website inspired by <a href="https://github.com/aws-samples/aws-cdk-examples/blob/master/typescript/static-site/static-site.ts" rel="noreferrer">https://github.com/aws-samples/aws-cdk-examples/blob/master/typescript/static-site/static-site.ts</a></p>
  <pre><code> const certificateArn = new acm.DnsValidatedCertificate(
            this,
            &quot;SiteCertificateR53&quot;,
            {
                domainName: props.siteDomain,
                hostedZone: props.zone,
                region: &quot;us-east-1&quot;, // Cloudfront only checks this region for certificates.
              }
          ).certificateArn;
   
  new cdk.CfnOutput(this, &quot;CertificateR53&quot;, {value: certificateArn});
  
  </code></pre>
  <p>Error:</p>
  <p>Received response status [FAILED] from custom resource. Message returned: Resource is not in the state certificateValidated</p>