DRIVERS-2209 outlined that if the AWS_EXECUTION_ENV env var is present, the app is running on AWS Lambda. This turns out to be too permissive because AWS_EXECUTION_ENV is used in other non-Lambda envs. For example the Windows evergreen machines have AWS_EXECUTION_ENV=EC2.
According to Lambda env var docs, I believe the driver needs to validate that the AWS_EXECUTION_ENV var begins with the "AWS_Lambda_" prefix:
- AWS_EXECUTION_ENV – The runtime identifier, prefixed by AWS_Lambda_ (for example, AWS_Lambda_java8). This environment variable is not defined for custom runtimes (for example, runtimes that use the provided or provided.al2 identifiers).
...- AWS_LAMBDA_RUNTIME_API – (Custom runtime) The host and port of the runtime API.
- split to
-
CDRIVER-4636 AWS Lambda metadata detection logic is too permissive
- Closed
-
CSHARP-4638 AWS Lambda metadata detection logic is too permissive
- Closed
-
CXX-2688 AWS Lambda metadata detection logic is too permissive
- Closed
-
GODRIVER-2833 AWS Lambda metadata detection logic is too permissive
- Closed
-
MOTOR-1129 AWS Lambda metadata detection logic is too permissive
- Closed
-
NODE-5260 AWS Lambda metadata detection logic is too permissive
- Closed
-
PHPC-2224 AWS Lambda metadata detection logic is too permissive
- Closed
-
PYTHON-3704 AWS Lambda metadata detection logic is too permissive
- Closed
-
RUBY-3251 AWS Lambda metadata detection logic is too permissive
- Closed
-
RUST-1645 AWS Lambda metadata detection logic is too permissive
- Closed
-
JAVA-4957 AWS Lambda metadata detection logic is too permissive
- Closed