Skip to content

Turn off remote config by default in AWS Lambda - #13590

Open
joeyzhao2018 wants to merge 1 commit into
masterfrom
joey.zhao/disable-remote-config-in-lambda
Open

joeyzhao2018 wants to merge 1 commit into
masterfrom
joey.zhao/disable-remote-config-in-lambda

Conversation

@joeyzhao2018

Copy link
Copy Markdown
Contributor

What Does This Do

In AWS Lambda, Remote Configuration is now off by default. It stays on only when DD_REMOTE_CONFIGURATION_ENABLED (or the legacy DD_REMOTE_CONFIG_ENABLED) is set to true. Nothing changes outside Lambda.

With Remote Configuration off, a Lambda function no longer starts the Remote Configuration poller. It also no longer starts AppSec in its inactive mode, where AppSec waits for Remote Configuration to activate it. Functions that set DD_APPSEC_ENABLED=true still start AppSec as before.

Motivation

The Datadog Lambda extension doesn't serve Remote Configuration: its /info endpoint doesn't list /v0.7/config. The poller can never receive a configuration in Lambda. It still wakes every 5 seconds while the function runs, and re-checks /info at most once a minute. The public docs list Lambda as unsupported, and dd-trace-js and dd-trace-py already turn Remote Configuration off there.

Most Java functions already intend to turn it off. Since DataDog/datadog-lambda-extension#117, the Lambda wrapper (AWS_LAMBDA_EXEC_WRAPPER=/opt/datadog_wrapper) exports DD_REMOTE_CONFIG_ENABLED=false for Java. #6642 later renamed the setting to DD_REMOTE_CONFIGURATION_ENABLED and kept the old name as an alias. Config honours that alias, so the poller doesn't start. But the startup check that decides whether AppSec starts ORs the two names, and the new name defaults to true. That check ignores the wrapper's setting, so AppSec still starts in inactive mode. Functions that don't use the wrapper keep Remote Configuration fully on.

Additional Notes

  • The Lambda default lives in two places that must agree: the startup check in Agent and Config. Both detect Lambda from AWS_LAMBDA_FUNCTION_NAME, as the existing Lambda checks do (profiling, Config.isAwsServerless()).
  • A function that points at a full Agent can still turn Remote Configuration back on, through an environment variable, a system property or stable config. The DD_TRACE_CONFIG properties file isn't enough on its own, because the startup check doesn't read it. This is the same as for the other features that are off by default, such as profiling.
  • Feature Flags default to the agentless source, which this change doesn't affect. A function that explicitly selects the Remote Configuration source now gets the existing "Remote Configuration unavailable" error at startup, instead of a provider that never receives flags.
  • Out of scope, both left for separate PRs:
    • Outside Lambda, the startup check still ORs the two setting names, so DD_REMOTE_CONFIGURATION_ENABLED=false alone doesn't stop AppSec from starting in inactive mode. Fixing that changes AppSec startup for every service, not just Lambda functions.
    • Azure Functions and Google Cloud Functions have the same gap: the serverless compatibility layer doesn't serve Remote Configuration either.

🤖 Generated with Claude Code

The Datadog Lambda extension serves no Remote Configuration: its /info
endpoint doesn't list /v0.7/config, so the poller can never receive a
configuration there. dd-trace-js and dd-trace-py already turn it off in
Lambda.

When AWS_LAMBDA_FUNCTION_NAME is set, both the startup check in Agent and
Config now default Remote Configuration to off. Setting
DD_REMOTE_CONFIGURATION_ENABLED or the legacy DD_REMOTE_CONFIG_ENABLED to
true still turns it on. Nothing changes outside Lambda.

The Lambda wrapper already sets the legacy DD_REMOTE_CONFIG_ENABLED=false
for Java. Config honoured it, but the startup check ignored it, so AppSec
still started in inactive mode. The check now honours it in Lambda.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joeyzhao2018 joeyzhao2018 added type: bug fix Bug fix tag: serverless Serverless support comp: remote config Configuration at Runtime tag: ai generated Largely based on code generated by an AI or LLM labels Nov 20, 2026
@datadog-official

datadog-official Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 83.33%
• Overall Coverage: 60.91% (-0.02%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 08ec091 | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.86 s 14.76 s [-0.1%; +1.5%] (no difference)
startup:insecure-bank:tracing:Agent 13.66 s 13.76 s [-1.6%; +0.1%] (no difference)
startup:petclinic:appsec:Agent 17.30 s 17.25 s [-0.4%; +1.1%] (no difference)
startup:petclinic:iast:Agent 17.11 s 17.28 s [-1.7%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 16.74 s 17.09 s [-3.0%; -1.0%] (significantly better)
startup:petclinic:sca:Agent 17.24 s 17.14 s [-0.2%; +1.3%] (no difference)
startup:petclinic:tracing:Agent 16.40 s 16.24 s [-0.1%; +2.0%] (no difference)

Commit: 08ec091f · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@joeyzhao2018
joeyzhao2018 marked this pull request as ready for review November 21, 2026 13:21
@joeyzhao2018
joeyzhao2018 requested a review from a team as a code owner November 21, 2026 13:21
@joeyzhao2018
joeyzhao2018 requested review from PerfectSlayer and removed request for a team November 21, 2026 13:21
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T13:24:58.325069Z 08ec091 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bits Code Review: PASS

More details

The completed static review found no reportable defect in Lambda’s default-off behavior or explicit opt-in handling. No human PR discussion supplied additional concerns.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 08ec091

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: remote config Configuration at Runtime tag: ai generated Largely based on code generated by an AI or LLM tag: serverless Serverless support type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant