Describe the bug
Hi,
In the L2 construct documentation https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_s3/ReplicationRule.html it is mentioned Cross Account support. but we have tried many different configurations without success. The only workaround is to fall back to the L1 CFN way.
replication_config = s3.CfnBucket.ReplicationConfigurationProperty(
role=replication_role_arn,
rules=[
s3.CfnBucket.ReplicationRuleProperty(
id=REPLICATION_RULE_ID,
status="Enabled",
prefix=REPLICATION_RULE_PREFIX,
priority=REPLICATION_RULE_PRIORITY,
destination=s3.CfnBucket.ReplicationDestinationProperty(
bucket=f"arn:aws:s3:::{destination_bucket}",
account=account,
access_control_translation=s3.CfnBucket.AccessControlTranslationProperty(
owner="Destination"
),
),
)
],
)
# Apply replication configuration to the bucket
cfn_bucket = self.bucket.node.default_child
cfn_bucket.replication_configuration = replication_config
Could this be clarified or fixed?
I suspect that the problem is related to this destination bucket owner setting:
Regression Issue
Last Known Working CDK Library Version
Expected Behavior
An example that work for Cross Replication or a fix
Current Behavior
Does not work
Reproduction Steps
Try to setup cross account s3 replication using only L2 constructs
Possible Solution
No response
Additional Information/Context
No response
AWS CDK Library version (aws-cdk-lib)
2.202.0
AWS CDK CLI version
2.1030.0 (build e46adaf)
Node.js Version
v24.10.0
OS
Ubuntu 24.04
Language
Python
Language Version
Python 3.13
Other information
No response
Describe the bug
Hi,
In the L2 construct documentation https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_s3/ReplicationRule.html it is mentioned Cross Account support. but we have tried many different configurations without success. The only workaround is to fall back to the L1 CFN way.
Could this be clarified or fixed?
I suspect that the problem is related to this destination bucket owner setting:
Regression Issue
Last Known Working CDK Library Version
Expected Behavior
An example that work for Cross Replication or a fix
Current Behavior
Does not work
Reproduction Steps
Try to setup cross account s3 replication using only L2 constructs
Possible Solution
No response
Additional Information/Context
No response
AWS CDK Library version (aws-cdk-lib)
2.202.0
AWS CDK CLI version
2.1030.0 (build e46adaf)
Node.js Version
v24.10.0
OS
Ubuntu 24.04
Language
Python
Language Version
Python 3.13
Other information
No response