Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
anyoussefinia committed Dec 9, 2024
1 parent 615a44a commit cf6a916
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions services/admin/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ provider:
path: ${ssm:/configuration/${self:custom.stage}/iam/path, ssm:/configuration/default/iam/path, "/"}
permissionsBoundary: !Sub arn:aws:iam::${AWS::AccountId}:policy${self:custom.iamPermissionsBoundaryPolicy}
statements:
# Allow DynamoDB access (example permissions)
- Effect: Allow
Action:
- dynamodb:Query
Expand All @@ -40,14 +39,6 @@ provider:
- arn:aws:dynamodb:*:*:table/onemac-develop-one
- arn:aws:dynamodb:*:*:table/${self:custom.oneMacTableName}
- arn:aws:dynamodb:*:*:table/${self:custom.oneMacTableName}/index/*

# Allow CreateRole and TagResource actions
- Effect: Allow
Action:
- iam:CreateRole
- iam:TagResource
- iam:PassRole
Resource: "*"

environment:
NODE_OPTIONS: '--enable-source-maps'
Expand All @@ -64,6 +55,7 @@ functions:
- cognitoUserPool:
pool: ${self:custom.stage}-user-pool # Ensure this resolves correctly
trigger: PreTokenGeneration
existing: true

resetData:
handler: ./handlers/resetData.main
Expand Down Expand Up @@ -104,25 +96,3 @@ functions:
handler: ./handlers/insertNotification.main
timeout: 180

resources:
Resources:
IamRoleCustomResourcesLambdaExecution:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action: sts:AssumeRole
Principal:
Service: lambda.amazonaws.com
Policies:
- PolicyName: CustomResourcePolicy
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- iam:CreateRole
- iam:TagResource
Resource: "*"

0 comments on commit cf6a916

Please sign in to comment.