code: 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;
      }
    }
  }
docs: 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