File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
src/deployments/cdk/src/deployments/iam Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,21 @@ export async function createConfigServiceRoles(props: IamConfigServiceRoleProps)
2929 managedPolicies : [ iam . ManagedPolicy . fromAwsManagedPolicyName ( 'service-role/AWSConfigRole' ) ] ,
3030 } ) ;
3131
32+ /**
33+ *
34+ * As per the documentation, the config role should have
35+ * the s3:PutObject permission to avoid access denied issues
36+ * while AWS config tries to check the s3 bucket (in another account) write permissions
37+ * https://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-policy.html
38+ *
39+ */
40+ configRecorderRole . addToPrincipalPolicy (
41+ new iam . PolicyStatement ( {
42+ actions : [ 's3:PutObject' ] ,
43+ resources : [ '*' ] ,
44+ } ) ,
45+ ) ;
46+
3247 new CfnIamRoleOutput ( accountStack , `ConfigRecorderRoleOutput` , {
3348 roleName : configRecorderRole . roleName ,
3449 roleArn : configRecorderRole . roleArn ,
You can’t perform that action at this time.
0 commit comments