Skip to content

Lambda role policy requires kms:Decrypt #4

@bwmetcalf

Description

@bwmetcalf

Describe the Bug

If the datadog api key is stored in ASM, the lambda role IAM policy requires kms:Decrypt privileges for the CMK used to encrypt the api key.

Expected Behavior

The lamba function should be able to read the datadog api key from ASM.

Steps to Reproduce

Add DD api key to ASM and use this module to create the forwarder lambda function. Without adding

        {
            "Sid": "AllowKMS",
            "Effect": "Allow",
            "Action": "kms:Decrypt",
            "Resource": [
                "<cmk arn>"
            ]
        }

to the lamba role policy, the function throws the following error:

[ERROR] ClientError: An error occurred (AccessDeniedException) when calling the GetSecretValue operation: Access to KMS is not allowed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions