Skip to content

CreateCertificateAuthorityAuditReport

Source: src/AWS/ACMPCA/CreateCertificateAuthorityAuditReport.ts

Runtime binding for acm-pca:CreateCertificateAuthorityAuditReport.

Bind a CertificateAuthority inside a function runtime to generate an audit report of every private-key use (issue/revoke) into an S3 bucket — e.g. from a scheduled compliance function. AWS allows at most one report per CA every 30 minutes. The S3 bucket policy must grant Amazon Web Services Private CA write access. Provide ACMPCA.CreateCertificateAuthorityAuditReportHttp on the Function effect to implement the binding.

// init
const createAuditReport =
yield* ACMPCA.CreateCertificateAuthorityAuditReport(ca);
// runtime
const report = yield* createAuditReport({
S3BucketName: bucketName,
AuditReportResponseFormat: "JSON",
});
// report.AuditReportId / report.S3Key