Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions infra/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,19 @@ Resources:
Type: AWS::ECR::Repository
Properties:
RepositoryName: !Ref EcrRepositoryName
RepositoryPolicyText:
Version: "2012-10-17"
Statement:
- Sid: AllowLambdaServiceToPullImages
Effect: Allow
Principal:
Service: lambda.amazonaws.com
Action:
- ecr:BatchGetImage
- ecr:GetDownloadUrlForLayer
Condition:
StringLike:
aws:sourceArn: !Sub "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:app-*"
# max. deployments per user handled in backend-api-lambda
LifecyclePolicy:
# rule would only apply if updated image with same tag
Expand Down Expand Up @@ -405,6 +418,8 @@ Resources:
Effect: Allow
Action:
- lambda:CreateFunction
- lambda:GetFunction
- lambda:UpdateFunctionCode
- lambda:CreateFunctionUrlConfig
- lambda:AddPermission
Resource: !Sub "arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:app-*"
Expand Down
Loading