Class LambdaMetadataHttpClient

java.lang.Object
software.amazon.lambda.powertools.metadata.internal.LambdaMetadataHttpClient

public class LambdaMetadataHttpClient extends Object
Internal HTTP client for fetching metadata from the Lambda Metadata Endpoint.

Uses HttpURLConnection to avoid additional dependencies - it's part of the JDK and works out of the box with GraalVM native image.

  • Constructor Details

    • LambdaMetadataHttpClient

      public LambdaMetadataHttpClient()
  • Method Details

    • fetchMetadata

      public LambdaMetadata fetchMetadata()
      Fetches metadata from the Lambda Metadata Endpoint.
      Returns:
      the Lambda metadata
      Throws:
      LambdaMetadataException - if the fetch fails