Skip to content

Commit

Permalink
now uses implicit permissions for lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
ketilaa committed Jan 16, 2025
1 parent 0af39b6 commit f4cd8c5
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -754,35 +754,12 @@ Resources:
Parameters:
Location: ./docs/oai-pmh-openapi.yaml

BasicLambdaRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service: [ lambda.amazonaws.com ]
Action: [ 'sts:AssumeRole' ]
Policies:
- PolicyName: writeLog
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource: !Sub 'arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:*:*'

PublicationOaiPmhFunction:
Type: AWS::Serverless::Function
Properties:
Description: Lambda for handling OAI-PMH requests
CodeUri: oai-pmh-handler
Handler: no.sikt.nva.oai.pmh.handler.OaiPmhHandler::handleRequest
Role: !GetAtt BasicLambdaRole.Arn
Environment:
Variables:
ALLOWED_ORIGIN: !Ref AllowedOrigins
Expand Down

0 comments on commit f4cd8c5

Please sign in to comment.