S3 Replication Without Encryption Configuration
cross-resource-s3-replication-unencrypted
What this rule checks
Detects S3 replication rules that omit EncryptionConfiguration, so replicated objects may not retain encryption at the destination bucket.
How to fix it
- 1Specify EncryptionConfiguration (with ReplicaKmsKeyID) on S3 replication rules so replicated objects retain encryption at the destination
CDK Insights pinpoints the exact file and line in your CDK source for every finding, so you can jump straight to the fix.
Affected resource types
AWS::S3::BucketIntentional? Suppress this finding
Sometimes a flag is deliberate — a genuinely public endpoint, say. You can dismiss cross-resource-s3-replication-unencrypted and the reason is kept in the report, not silently hidden.
In .cdk-insights.json:
{
"ignoreRules": [
{ "id": "cross-resource-s3-replication-unencrypted", "reason": "Why this is intentional" }
]
}Or inline in your CDK code:
Validations.of(scope).acknowledge({
id: 'cdk-insights::cross-resource-s3-replication-unencrypted',
reason: 'Why this is intentional',
});Use the rule ID cross-resource-s3-replication-unencrypted shown above — not the CDK-* ID from SARIF / GitHub code scanning. To dismiss every finding on one construct instead, use ignorePaths. Suppression docs →
Catch this in your stack
$ npx cdk-insights scanCDK Insights runs this and 144+ other rules locally against your synthesised CDK app — free, no account, your code never leaves your machine.