Skip to content
GitHubXDiscord

ConformancePack

The ConformancePack resource lets you manage AWS Config ConformancePacks that help ensure compliance of your AWS resources with specific rules and standards.

Create a basic ConformancePack with required properties and one optional parameter.

import AWS from "alchemy/aws/control";
const basicConformancePack = await AWS.Config.ConformancePack("basicConformancePack", {
ConformancePackName: "BasicCompliancePack",
DeliveryS3Bucket: "my-config-bucket",
DeliveryS3KeyPrefix: "compliance-packs/"
});

Configure a ConformancePack with input parameters and SSM document details for more complex setups.

const advancedConformancePack = await AWS.Config.ConformancePack("advancedConformancePack", {
ConformancePackName: "AdvancedCompliancePack",
DeliveryS3Bucket: "my-config-bucket",
ConformancePackInputParameters: [
{
ParameterName: "S3BucketName",
ParameterValue: "my-secure-bucket"
},
{
ParameterName: "DynamoDBTable",
ParameterValue: "my-table"
}
],
TemplateSSMDocumentDetails: {
DocumentName: "MySSMDocument",
DocumentVersion: "1"
}
});

Deploy a ConformancePack using a CloudFormation template stored in S3.

const s3TemplateConformancePack = await AWS.Config.ConformancePack("s3TemplateConformancePack", {
ConformancePackName: "S3TemplateCompliancePack",
TemplateS3Uri: "s3://my-config-templates/compliance-pack-template.yaml",
DeliveryS3Bucket: "my-config-bucket"
});

Create a ConformancePack that will adopt existing resources instead of failing if they already exist.

const adoptExistingConformancePack = await AWS.Config.ConformancePack("adoptExistingConformancePack", {
ConformancePackName: "AdoptExistingCompliancePack",
DeliveryS3Bucket: "my-config-bucket",
adopt: true
});