Skip to content

Commit 2711a11

Browse files
Fix sls deployment
Signed-off-by: Lukasz Gryglicki <lgryglicki@cncf.io> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
1 parent fa16320 commit 2711a11

2 files changed

Lines changed: 118 additions & 84 deletions

File tree

cla-backend-go/serverless.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ provider:
7575
statements:
7676
- Effect: Allow
7777
Action:
78-
- secretsmanager:GetSecretValue
79-
Resource:
80-
- ${self:custom.datadog.apiKeySecretArn}
81-
- Effect: Allow
82-
Action:
83-
- cloudwatch:*
78+
# - cloudwatch:*
79+
- cloudwatch:PutMetricData
8480
Resource: "*"
8581
- Effect: Allow
8682
Action:
@@ -352,3 +348,20 @@ functions:
352348
- 'bin/backend-aws-lambda'
353349
layers:
354350
- ${self:custom.datadog.extensionLayerArn}
351+
352+
resources:
353+
Resources:
354+
DatadogApiKeySecretReadPolicy:
355+
Type: AWS::IAM::Policy
356+
Properties:
357+
PolicyName: ${self:service}-${opt:stage, 'dev'}-datadog-api-key-secret-read
358+
Roles:
359+
- Ref: IamRoleLambdaExecution
360+
PolicyDocument:
361+
Version: '2012-10-17'
362+
Statement:
363+
- Effect: Allow
364+
Action:
365+
- secretsmanager:GetSecretValue
366+
Resource:
367+
- ${self:custom.datadog.apiKeySecretArn}

0 commit comments

Comments
 (0)