Dan Van Brunt
01/25/2022, 2:03 PMapplyRemovalPolicy(cdk.RemovalPolicy.RETAIN)
to inline policies on a role?
roleCleanup.addToPolicy(
new iam.PolicyStatement({
effect: iam.Effect.ALLOW,
actions: ['events:DeleteRule'],
resources: [ cronCleanupArn ],
}),
)
Dan Van Brunt
01/25/2022, 2:04 PMFrank
Frank
DeletionPolicy
is a resource property, not a part of the IAM policy statement.Dan Van Brunt
01/25/2022, 7:08 PMDan Van Brunt
01/25/2022, 7:09 PMconst permission = lambdaCleanup.permissionsNode.tryFindChild(lambdaPermissionId) as cdk.IResource;
Dan Van Brunt
01/25/2022, 7:09 PM