brandonweiss / discharge

⚡️ A simple, easy way to deploy static websites to Amazon S3.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

discharge distribute gets stuck on verifying existing certificates

bugeats opened this issue · comments

  ✔ Load configuration
  ↓ Create certificate [skipped]
    → Certificate already exists
  ⠸ Verify certificate
    → A verification email has been sent to an email address associated with your domain
    Create distribution
    Deploy distribution

Why would you need to verify an existing certificate? In any case, the process is now stuck in my case.

Hmm. Well, Discharge checks the status of your certificate to find out if it’s been “issued” or not.

if (await isCertificateVerified(context, certificateARN)) { return }

const isCertificateVerified = async (context, certificateARN) => {
let data = await context.acm.describeCertificate({ CertificateArn: certificateARN })
let status = data.Certificate.Status
return status === "ISSUED"
}

If it’s been issued then it returns early and doesn’t attempt to verify it. Is your certificate issued? What is its status?

I had to modify code since this stuff wasn't in any sort of debug log. Indeed the certificate is set to PENDING_VALIDATION. I was confused because of #248