DataDog / datadog-serverless-functions

Repo of AWS Lambda and Azure Functions functions that process streams and send data to Datadog
Apache License 2.0
336 stars 378 forks source link

problem with api key length #695

Closed Canueto closed 11 months ago

Canueto commented 12 months ago

Describe what happened: Hello, I'm in the process of updating to version 3.83 of the AWS application using the latest template.yml file. Everything is fine during this update. However, when it comes to the logging process in the Lambda function, I am encountering errors related to the API key length. The lambda_function.py expects an API key with a length of 32 characters, but in my DataDog account, I can only find API keys with a length of 33 characters.

is a bug?

am doing something bad ?

RaphaelAllier commented 11 months ago

Hello,

Which solution/service are you using to store you API KEY (e.g. SecretsManager, KMS, SSM, etc.) ? We did change the KMS API key decoding recently, but it should impact the length of the key itself

Canueto commented 11 months ago

Hello, Im using SecretsManager. At the beginning of the update process with the YAML file, the API KEY I was using got deleted, so I created a new one because I noticed an error in the logs indicating that the key was required.

RaphaelAllier commented 11 months ago

Hello, Since the SecretsManager approach needs the secret ARN, I find it strange that the underlying secret (API key) would change length when upgrading. I'd recommend opening a ticket on our support platform to investigate this further

Canueto commented 11 months ago

[SOLVED] My mistake, in the update form, I was setting the ARN of the secret; I should have left it as the default value.

@RaphaelAllier thank you for your time