-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: automate AppSec enablement setup (e.g:
AWS_LAMBDA_RUNTIME_API
) (
#143) * feat: honor AWS_LAMBDA_EXEC_WRAPPER when AWS Lambda does not In order to simplify onboarding & make it more uniform across languages, inspect the value of the `AWS_LAMBDA_EXEC_WRAPPER` environment variable and apply select environment variable changes it perofrms upon decorating a handler. This is necessary/useful because that environment variable is not honored by custom runtimes (`provided`, `provided.al2`) as well as the `go1.x` runtime (which is a glorified provided runtime). The datadog Lambda wrapper starts a proxy to inject ASM functionality directly on the Lambda runtime API instead of having to manually instrument each and every lambda handler/application, and modifies `AWS_LAMBDA_RUNTIME_API` to instruct Lambda language runtime client libraries to go through it instead of directly interacting with the Lambda control plane. APPSEC-11534 * pivot to a different, cheaper strategy * typo fix * PR feedback * minor fixups * add warning in go1.x runtime if lambda.norpc build tag was not enabled
- Loading branch information
1 parent
1ca51d5
commit 7ec9261
Showing
4 changed files
with
110 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build lambda.norpc | ||
// +build lambda.norpc | ||
|
||
/* | ||
* Unless explicitly stated otherwise all files in this repository are licensed | ||
* under the Apache License Version 2.0. | ||
* | ||
* This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
* Copyright 2021 Datadog, Inc. | ||
*/ | ||
|
||
package ddlambda | ||
|
||
const awsLambdaRpcSupport = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build !lambda.norpc | ||
// +build !lambda.norpc | ||
|
||
/* | ||
* Unless explicitly stated otherwise all files in this repository are licensed | ||
* under the Apache License Version 2.0. | ||
* | ||
* This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
* Copyright 2021 Datadog, Inc. | ||
*/ | ||
|
||
package ddlambda | ||
|
||
const awsLambdaRpcSupport = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters