Skip to content

IssueCertificate

Source: src/AWS/ACMPCA/IssueCertificate.ts

Runtime binding for acm-pca:IssueCertificate.

Bind a CertificateAuthority inside a function runtime to sign certificate signing requests (CSRs) with the CA’s private key. Returns the ARN of the issued certificate — retrieve the PEM with the GetCertificate binding (issuance is asynchronous, so poll while RequestInProgressException is observed). Provide ACMPCA.IssueCertificateHttp on the Function effect to implement the binding.

// init
const issueCertificate = yield* ACMPCA.IssueCertificate(ca);
// runtime
const issued = yield* issueCertificate({
Csr: new TextEncoder().encode(csrPem),
SigningAlgorithm: "SHA256WITHRSA",
Validity: { Type: "DAYS", Value: 7 },
});
// issued.CertificateArn