Skip to content

Commit

Permalink
fix: use managed policy for permissions boundary (#253)
Browse files Browse the repository at this point in the history
A managed policy is needed for permission boundary
  • Loading branch information
anayeaye authored Nov 22, 2023
2 parents 08d4365 + 60882e8 commit fc51c36
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)

if veda_app_settings.permissions_boundary_policy_name:
permissions_boundary_policy = aws_iam.Policy.from_policy_name(
self,
"permissions-boundary",
veda_app_settings.permissions_boundary_policy_name,
permissions_boundary_policy = (
aws_iam.ManagedPolicy.from_managed_policy_name(
self,
"permissions-boundary",
veda_app_settings.permissions_boundary_policy_name,
)
)
aws_iam.PermissionsBoundary.of(self).apply(permissions_boundary_policy)
Aspects.of(self).add(PermissionsBoundaryAspect(permissions_boundary_policy))
Expand Down

0 comments on commit fc51c36

Please sign in to comment.