AWS Lambda Function URL API

Configure dedicated HTTPS endpoints for Lambda functions that can be invoked directly via HTTP

Documentation

Specifications

Code Examples

Schemas & Data

Other Resources

OpenAPI Specification

aws-lambda-function-url-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS Lambda Aliases Function URL API
  description: The AWS Lambda API enables you to create, configure, and manage Lambda functions, layers, event source mappings, aliases, versions, and function URLs programmatically. Lambda runs your code on high-availability compute infrastructure without provisioning or managing servers, performing all administration of compute resources including capacity provisioning, automatic scaling, and logging. The API version used is 2015-03-31.
  version: '2015-03-31'
  contact:
    name: AWS Support
    url: https://aws.amazon.com/contact-us/
  termsOfService: https://aws.amazon.com/service-terms/
servers:
- url: https://lambda.{region}.amazonaws.com
  description: AWS Lambda Regional Endpoint
  variables:
    region:
      description: The AWS region for the Lambda service endpoint
      default: us-east-1
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - eu-west-1
      - eu-west-2
      - eu-west-3
      - eu-central-1
      - eu-north-1
      - ap-southeast-1
      - ap-southeast-2
      - ap-northeast-1
      - ap-northeast-2
      - ap-south-1
      - sa-east-1
      - ca-central-1
security:
- sigv4: []
tags:
- name: Function URL
  description: Configure dedicated HTTPS endpoints for Lambda functions that can be invoked directly via HTTP
paths:
  /2021-10-31/functions/{FunctionName}/url:
    get:
      operationId: getFunctionUrlConfig
      summary: Aws Lambda Get Function Url Configuration
      description: Returns details about a Lambda function URL, including the function URL itself, the authorization type, CORS settings, creation and modification timestamps, and the invoke mode.
      tags:
      - Function URL
      parameters:
      - $ref: '#/components/parameters/functionName'
      - $ref: '#/components/parameters/qualifier'
      responses:
        '200':
          description: Function URL configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunctionUrlConfig'
              examples:
                Getfunctionurlconfig200Example:
                  summary: Default getFunctionUrlConfig 200 response
                  x-microcks-default: true
                  value:
                    FunctionUrl: https://www.example.com
                    FunctionArn: example_value
                    AuthType: NONE
                    Cors:
                      AllowCredentials: true
                      AllowHeaders:
                      - {}
                      AllowMethods:
                      - {}
                      AllowOrigins:
                      - {}
                      ExposeHeaders:
                      - {}
                      MaxAge: 10
                    CreationTime: example_value
                    LastModifiedTime: example_value
                    InvokeMode: BUFFERED
        '404':
          description: Function URL configuration not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Getfunctionurlconfig404Example:
                  summary: Default getFunctionUrlConfig 404 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createFunctionUrlConfig
      summary: Aws Lambda Create a Function Url
      description: Creates a Lambda function URL with the specified authorization type. A function URL is a dedicated HTTP(S) endpoint that you can use to invoke your function. You can create a function URL for the $LATEST unpublished version or for any function alias.
      tags:
      - Function URL
      parameters:
      - $ref: '#/components/parameters/functionName'
      - $ref: '#/components/parameters/qualifier'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFunctionUrlConfigRequest'
            examples:
              CreatefunctionurlconfigRequestExample:
                summary: Default createFunctionUrlConfig request
                x-microcks-default: true
                value:
                  AuthType: NONE
                  Cors:
                    AllowCredentials: true
                    AllowHeaders:
                    - {}
                    AllowMethods:
                    - {}
                    AllowOrigins:
                    - {}
                    ExposeHeaders:
                    - {}
                    MaxAge: 10
                  InvokeMode: BUFFERED
      responses:
        '201':
          description: Function URL created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunctionUrlConfig'
              examples:
                Createfunctionurlconfig201Example:
                  summary: Default createFunctionUrlConfig 201 response
                  x-microcks-default: true
                  value:
                    FunctionUrl: https://www.example.com
                    FunctionArn: example_value
                    AuthType: NONE
                    Cors:
                      AllowCredentials: true
                      AllowHeaders:
                      - {}
                      AllowMethods:
                      - {}
                      AllowOrigins:
                      - {}
                      ExposeHeaders:
                      - {}
                      MaxAge: 10
                    CreationTime: example_value
                    LastModifiedTime: example_value
                    InvokeMode: BUFFERED
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Createfunctionurlconfig404Example:
                  summary: Default createFunctionUrlConfig 404 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '409':
          description: Function URL already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Createfunctionurlconfig409Example:
                  summary: Default createFunctionUrlConfig 409 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: updateFunctionUrlConfig
      summary: Aws Lambda Update a Function Url
      description: Updates the configuration for a Lambda function URL.
      tags:
      - Function URL
      parameters:
      - $ref: '#/components/parameters/functionName'
      - $ref: '#/components/parameters/qualifier'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFunctionUrlConfigRequest'
            examples:
              UpdatefunctionurlconfigRequestExample:
                summary: Default updateFunctionUrlConfig request
                x-microcks-default: true
                value:
                  AuthType: NONE
                  Cors:
                    AllowCredentials: true
                    AllowHeaders:
                    - {}
                    AllowMethods:
                    - {}
                    AllowOrigins:
                    - {}
                    ExposeHeaders:
                    - {}
                    MaxAge: 10
                  InvokeMode: BUFFERED
      responses:
        '200':
          description: Function URL updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunctionUrlConfig'
              examples:
                Updatefunctionurlconfig200Example:
                  summary: Default updateFunctionUrlConfig 200 response
                  x-microcks-default: true
                  value:
                    FunctionUrl: https://www.example.com
                    FunctionArn: example_value
                    AuthType: NONE
                    Cors:
                      AllowCredentials: true
                      AllowHeaders:
                      - {}
                      AllowMethods:
                      - {}
                      AllowOrigins:
                      - {}
                      ExposeHeaders:
                      - {}
                      MaxAge: 10
                    CreationTime: example_value
                    LastModifiedTime: example_value
                    InvokeMode: BUFFERED
        '404':
          description: Function URL not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Updatefunctionurlconfig404Example:
                  summary: Default updateFunctionUrlConfig 404 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: deleteFunctionUrlConfig
      summary: Aws Lambda Delete a Function Url
      description: Deletes a Lambda function URL.
      tags:
      - Function URL
      parameters:
      - $ref: '#/components/parameters/functionName'
      - $ref: '#/components/parameters/qualifier'
      responses:
        '204':
          description: Function URL deleted
        '404':
          description: Function URL not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Deletefunctionurlconfig404Example:
                  summary: Default deleteFunctionUrlConfig 404 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    qualifier:
      name: Qualifier
      in: query
      description: A version number or alias name
      schema:
        type: string
        minLength: 1
        maxLength: 128
    functionName:
      name: FunctionName
      in: path
      required: true
      description: The name, ARN, or partial ARN of the Lambda function. Can be a function name, a function ARN, or a partial ARN.
      schema:
        type: string
        minLength: 1
        maxLength: 170
  schemas:
    CreateFunctionUrlConfigRequest:
      type: object
      required:
      - AuthType
      description: Request body for creating a function URL
      properties:
        AuthType:
          type: string
          description: The type of authentication. NONE allows public unauthenticated access. AWS_IAM requires IAM authentication.
          enum:
          - NONE
          - AWS_IAM
          example: NONE
        Cors:
          $ref: '#/components/schemas/Cors'
        InvokeMode:
          type: string
          enum:
          - BUFFERED
          - RESPONSE_STREAM
          example: BUFFERED
    ErrorResponse:
      type: object
      description: Error response from the Lambda API
      properties:
        Type:
          type: string
          description: The error type
          example: example_value
        Message:
          type: string
          description: The error message
          example: example_value
        Code:
          type: string
          description: The error code
          example: example_value
    Cors:
      type: object
      description: Cross-origin resource sharing (CORS) settings for a function URL
      properties:
        AllowCredentials:
          type: boolean
          description: Whether to allow cookies or other credentials
          example: true
        AllowHeaders:
          type: array
          description: The HTTP headers allowed in requests
          items:
            type: string
          maxItems: 100
          example: []
        AllowMethods:
          type: array
          description: The HTTP methods allowed
          items:
            type: string
          maxItems: 6
          example: []
        AllowOrigins:
          type: array
          description: The origins allowed to access the function URL
          items:
            type: string
          maxItems: 100
          example: []
        ExposeHeaders:
          type: array
          description: The HTTP headers exposed in the response
          items:
            type: string
          maxItems: 100
          example: []
        MaxAge:
          type: integer
          description: Maximum time in seconds that a browser can cache results of a preflight request
          minimum: 0
          maximum: 86400
          example: 10
    UpdateFunctionUrlConfigRequest:
      type: object
      description: Request body for updating a function URL configuration
      properties:
        AuthType:
          type: string
          enum:
          - NONE
          - AWS_IAM
          example: NONE
        Cors:
          $ref: '#/components/schemas/Cors'
        InvokeMode:
          type: string
          enum:
          - BUFFERED
          - RESPONSE_STREAM
          example: BUFFERED
    FunctionUrlConfig:
      type: object
      description: Configuration for a Lambda function URL
      properties:
        FunctionUrl:
          type: string
          description: The HTTP URL endpoint for the function
          example: https://www.example.com
        FunctionArn:
          type: string
          description: The ARN of the function
          example: example_value
        AuthType:
          type: string
          description: The type of authentication the function URL uses
          enum:
          - NONE
          - AWS_IAM
          example: NONE
        Cors:
          $ref: '#/components/schemas/Cors'
        CreationTime:
          type: string
          description: When the function URL was created in ISO 8601 format
          example: example_value
        LastModifiedTime:
          type: string
          description: When the function URL was last modified
          example: example_value
        InvokeMode:
          type: string
          description: Use BUFFERED for synchronous invocation or RESPONSE_STREAM for response streaming
          enum:
          - BUFFERED
          - RESPONSE_STREAM
          example: BUFFERED
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4 authentication. Requests must be signed with valid AWS credentials that have the appropriate Lambda IAM permissions.
externalDocs:
  description: AWS Lambda API Reference
  url: https://docs.aws.amazon.com/lambda/latest/api/welcome.html