(AWS Backup): Don't add AWSBackupServiceRolePolicyForBackup policy to role automatically #25669
Closed
2 tasks
Labels
@aws-cdk/aws-iam
Related to AWS Identity and Access Management
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
needs-reproduction
This issue needs reproduction.
p2
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the feature
There should be an option to prevent
BackupSelection
from adding theAWSBackupServiceRolePolicyForBackup
policy to the providedrole
.Use Case
I'm enabling AWS Backup in multiple AWS accounts using cdk-stacksets.
First, I'm creating a role in each account for backup and attaching the
AWSBackupServiceRolePolicyForBackup
andAWSBackupServiceRolePolicyForS3Backup
policies.Then, I'm importing this role using
Role.from_role_name
.Then I'm passing the role to
add_selection
:When I run
cdk synth
, I get this error:The above error is caused by #8307.
Proposed Solution
Add a parameter to
BackupSelection
to make it optional for policies to be attached to a provided role. For example,attach_backup_policies=False
.Other Information
No response
Acknowledgements
CDK version used
2.79.1
Environment details (OS name and version, etc.)
Mac OS 13.3.1 Python 3.7.13
The text was updated successfully, but these errors were encountered: