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;
    }
  }
}
async function ( arn ) { const acm = new aws . ACM ( ) ; console . log ( ` ${ 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
Deletes a certificate from AWS Certificate Manager ( ACM ) by its ARN . If the certificate does not exist the function will return normally .