packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/lib/index.js
async function (arn) {
  const acm = new aws.ACM();

  console.log(`Deleting certificate ${arn}`);

  try {
    await acm.deleteCertificate({
      CertificateArn: arn
    }).promise();
  } catch (err) {
    if (err.name !== 'ResourceNotFoundException') {
      throw err;
    }
  }
}
async function (arn) {
  const acm = new aws.ACM();

  console.log(`Deleting certificate ${arn}`);

  try {
    await acm.deleteCertificate({
      CertificateArn: arn
    }).promise();
  } catch (err) {
    if (err.name !== 'ResourceNotFoundException') {
      throw err;
    }
  }
}
Deletes a certificate from AWS Certificate Manager (ACM) by its ARN.
If the certificate does not exist, the function will return normally.

@param {string} arn The certificate ARN