From 3e7b7752cd89e0e7f3ea30cc6c21425c472282e0 Mon Sep 17 00:00:00 2001 From: Chodavarapu Naga Viswanadha Avinash Date: Wed, 4 Dec 2024 10:26:59 +0530 Subject: [PATCH] feat: Policy update as per IAM least privilege (#243) * feat: updated policy.json --- examples/terraform/nodejs/lambda-policy.json | 14 -------------- examples/terraform/python/lambda-policy.json | 2 +- examples/terraform/ruby/lambda-policy.json | 2 +- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/examples/terraform/nodejs/lambda-policy.json b/examples/terraform/nodejs/lambda-policy.json index 9f9320c..bc6df25 100644 --- a/examples/terraform/nodejs/lambda-policy.json +++ b/examples/terraform/nodejs/lambda-policy.json @@ -11,20 +11,6 @@ "Resource": [ "arn:aws:logs:us-east-1::log-group:/aws/lambda/newrelic-terraform-example-nodejs:*" ] - "Resource": "*" - }, - { - "Sid": "", - "Action": "s3:*", - "Effect": "Allow", - "Action": [ - "logs:CreateLogGroup", - "logs:CreateLogStream", - "logs:PutLogEvents" - ], - "Resource": [ - "arn:aws:logs:us-east-1::log-group:/aws/lambda/newrelic-terraform-example-nodejs:*" - ] } ] } \ No newline at end of file diff --git a/examples/terraform/python/lambda-policy.json b/examples/terraform/python/lambda-policy.json index b5f07aa..5a328d2 100644 --- a/examples/terraform/python/lambda-policy.json +++ b/examples/terraform/python/lambda-policy.json @@ -15,7 +15,7 @@ "logs:PutLogEvents" ], "Resource": [ - "arn:aws:logs:us-east-1::log-group:/aws/lambda/newrelic-terraform-example-nodejs:*" + "arn:aws:logs:us-east-1::log-group:/aws/lambda/newrelic-terraform-example-python:*" ] } ] diff --git a/examples/terraform/ruby/lambda-policy.json b/examples/terraform/ruby/lambda-policy.json index bc6df25..39e40e0 100644 --- a/examples/terraform/ruby/lambda-policy.json +++ b/examples/terraform/ruby/lambda-policy.json @@ -9,7 +9,7 @@ "logs:PutLogEvents" ], "Resource": [ - "arn:aws:logs:us-east-1::log-group:/aws/lambda/newrelic-terraform-example-nodejs:*" + "arn:aws:logs:us-east-1::log-group:/aws/lambda/newrelic-terraform-example-ruby:*" ] } ]