Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2623

AWS Lambda metadata detection logic is too permissive

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: FaaS, Handshake
    • None
    • Needed
    • Hide

      Teams that have already implemented DRIVERS-2209 must tweak the AWS lambda detection logic as described in this commit:
      Message: DRIVERS-2623 AWS_EXECUTION_ENV must start with "AWS_Lambda_" (#1414)
      Branch: master
      https://github.com/mongodb/specifications/commit/2de99bcce0c2b84a57a089194b43932d2a281e02

      Other teams should implement this change at the same time as DRIVERS-2209.

      Show
      Teams that have already implemented DRIVERS-2209 must tweak the AWS lambda detection logic as described in this commit: Message: DRIVERS-2623 AWS_EXECUTION_ENV must start with "AWS_Lambda_" (#1414) Branch: master https://github.com/mongodb/specifications/commit/2de99bcce0c2b84a57a089194b43932d2a281e02 Other teams should implement this change at the same time as DRIVERS-2209.
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-4636 Fixed 1.25.0
      CXX-2688 Fixed 3.9.0
      CSHARP-4638 Fixed 2.20.0
      GODRIVER-2833 Fixed 1.12.0
      JAVA-4957 Duplicate
      NODE-5260 Fixed 5.5.0
      MOTOR-1129 Duplicate
      PYTHON-3704 Duplicate
      PHPC-2224 Done
      RUBY-3251 Duplicate
      RUST-1645 Fixed 2.6.0
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-4636 Fixed 1.25.0 CXX-2688 Fixed 3.9.0 CSHARP-4638 Fixed 2.20.0 GODRIVER-2833 Fixed 1.12.0 JAVA-4957 Duplicate NODE-5260 Fixed 5.5.0 MOTOR-1129 Duplicate PYTHON-3704 Duplicate PHPC-2224 Done RUBY-3251 Duplicate RUST-1645 Fixed 2.6.0

      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.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Abraham Egnor Abraham Egnor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: