Skip to content

Commit

Permalink
Update IAM policies to separate DynamoDB access by table
Browse files Browse the repository at this point in the history
Renamed the existing policy to "HandlesTableAccess" for clarity and restricted its scope to the Handles table. Added a new "CredentialsTableAccess" policy to manage permissions specifically for the Credentials table. This improves granularity and adheres to the principle of least privilege.
  • Loading branch information
arkavo-com committed Dec 30, 2024
1 parent e6db25a commit 4283648
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions handle-resolution-service/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -417,19 +417,31 @@ Resources:
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
Policies:
- PolicyName: DynamoDBAccess
- PolicyName: HandlesTableAccess
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:DeleteItem
- dynamodb:Query
- dynamodb:Scan
Resource:
- !GetAtt HandleTable.Arn
- PolicyName: CredentialsTableAccess
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:DeleteItem
- dynamodb:UpdateItem
- dynamodb:Query
- dynamodb:Scan
Resource:
- !GetAtt CredentialsTable.Arn
- !Sub "${CredentialsTable.Arn}/index/*"

Expand Down

0 comments on commit 4283648

Please sign in to comment.