AWS Lambda Functions API

Create, configure, invoke, and manage Lambda functions

Documentation

Specifications

Code Examples

Schemas & Data

Other Resources

OpenAPI Specification

aws-lambda-functions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: AWS Lambda Aliases Functions 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: Functions
  description: Create, configure, invoke, and manage Lambda functions
paths:
  /2015-03-31/functions:
    get:
      operationId: listFunctions
      summary: Aws Lambda List Functions
      description: Returns a list of Lambda functions with the version-specific configuration of each. Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version. The response includes the function configuration for each version along with the function ARN and name.
      tags:
      - Functions
      parameters:
      - $ref: '#/components/parameters/masterRegion'
      - $ref: '#/components/parameters/functionVersion'
      - $ref: '#/components/parameters/marker'
      - $ref: '#/components/parameters/maxItems'
      responses:
        '200':
          description: List of functions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFunctionsResponse'
              examples:
                Listfunctions200Example:
                  summary: Default listFunctions 200 response
                  x-microcks-default: true
                  value:
                    NextMarker: example_value
                    Functions:
                    - FunctionName: example_value
                      FunctionArn: example_value
                      Runtime: nodejs18.x
                      Role: example_value
                      Handler: example_value
                      CodeSize: 10
                      Description: A sample description.
                      Timeout: 10
                      MemorySize: 10
                      LastModified: example_value
                      CodeSha256: example_value
                      Version: example_value
                      DeadLetterConfig: {}
                      Environment: {}
                      KMSKeyArn: example_value
                      TracingConfig: {}
                      MasterArn: example_value
                      RevisionId: '500123'
                      Layers: {}
                      State: Pending
                      StateReason: example_value
                      StateReasonCode: Idle
                      LastUpdateStatus: Successful
                      LastUpdateStatusReason: example_value
                      LastUpdateStatusReasonCode: example_value
                      PackageType: Zip
                      ImageConfigResponse: {}
                      Architectures: {}
                      EphemeralStorage: {}
                      SnapStart: {}
                      RuntimeVersionConfig: {}
                      LoggingConfig: {}
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Listfunctions429Example:
                  summary: Default listFunctions 429 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createFunction
      summary: Aws Lambda Create a Function
      description: Creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a ZIP archive or container image that contains your function code. The execution role grants the function permission to use AWS services. You can configure the function's memory, timeout, environment variables, VPC settings, layers, and other options.
      tags:
      - Functions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFunctionRequest'
            examples:
              CreatefunctionRequestExample:
                summary: Default createFunction request
                x-microcks-default: true
                value:
                  FunctionName: example_value
                  Runtime: example_value
                  Role: example_value
                  Handler: example_value
                  Code:
                    ZipFile: example_value
                    S3Bucket: example_value
                    S3Key: example_value
                    S3ObjectVersion: example_value
                    ImageUri: example_value
                  Description: A sample description.
                  Timeout: 10
                  MemorySize: 10
                  Publish: true
                  VpcConfig:
                    SubnetIds:
                    - {}
                    SecurityGroupIds:
                    - {}
                  PackageType: Zip
                  DeadLetterConfig:
                    TargetArn: example_value
                  Environment:
                    Variables: example_value
                  KMSKeyArn: example_value
                  TracingConfig:
                    Mode: Active
                  Tags: example_value
                  Layers:
                  - example_value
                  Architectures:
                  - x86_64
                  EphemeralStorage:
                    Size: 10
                  SnapStart:
                    ApplyOn: PublishedVersions
                  LoggingConfig:
                    LogFormat: JSON
                    ApplicationLogLevel: example_value
                    SystemLogLevel: example_value
                    LogGroup: example_value
      responses:
        '201':
          description: Function created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunctionConfiguration'
              examples:
                Createfunction201Example:
                  summary: Default createFunction 201 response
                  x-microcks-default: true
                  value:
                    FunctionName: example_value
                    FunctionArn: example_value
                    Runtime: nodejs18.x
                    Role: example_value
                    Handler: example_value
                    CodeSize: 10
                    Description: A sample description.
                    Timeout: 10
                    MemorySize: 10
                    LastModified: example_value
                    CodeSha256: example_value
                    Version: example_value
                    VpcConfig:
                      SubnetIds:
                      - {}
                      SecurityGroupIds:
                      - {}
                      VpcId: '500123'
                    DeadLetterConfig:
                      TargetArn: example_value
                    Environment:
                      Variables: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    KMSKeyArn: example_value
                    TracingConfig:
                      Mode: Active
                    MasterArn: example_value
                    RevisionId: '500123'
                    Layers:
                    - Arn: example_value
                      CodeSize: 10
                      SigningProfileVersionArn: example_value
                      SigningJobArn: example_value
                    State: Pending
                    StateReason: example_value
                    StateReasonCode: Idle
                    LastUpdateStatus: Successful
                    LastUpdateStatusReason: example_value
                    LastUpdateStatusReasonCode: example_value
                    PackageType: Zip
                    ImageConfigResponse:
                      ImageConfig:
                        EntryPoint:
                        - {}
                        Command:
                        - {}
                        WorkingDirectory: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    Architectures:
                    - x86_64
                    EphemeralStorage:
                      Size: 10
                    SnapStart:
                      ApplyOn: PublishedVersions
                      OptimizationStatus: true
                    RuntimeVersionConfig:
                      RuntimeVersionArn: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    LoggingConfig:
                      LogFormat: JSON
                      ApplicationLogLevel: TRACE
                      SystemLogLevel: DEBUG
                      LogGroup: example_value
        '400':
          description: Invalid parameter value or missing required parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Createfunction400Example:
                  summary: Default createFunction 400 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '403':
          description: Access denied or code signing validation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Createfunction403Example:
                  summary: Default createFunction 403 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '409':
          description: Resource already exists or is in use
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Createfunction409Example:
                  summary: Default createFunction 409 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Createfunction429Example:
                  summary: Default createFunction 429 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2015-03-31/functions/{FunctionName}:
    get:
      operationId: getFunction
      summary: Aws Lambda Get a Function
      description: Returns information about the function or function version, with a link to download the deployment package that is valid for 10 minutes. If you specify a function version, only details specific to that version are returned. The response includes the function configuration, code location, tags, and concurrency settings.
      tags:
      - Functions
      parameters:
      - $ref: '#/components/parameters/functionName'
      - $ref: '#/components/parameters/qualifier'
      responses:
        '200':
          description: Function details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetFunctionResponse'
              examples:
                Getfunction200Example:
                  summary: Default getFunction 200 response
                  x-microcks-default: true
                  value:
                    Configuration:
                      FunctionName: example_value
                      FunctionArn: example_value
                      Runtime: nodejs18.x
                      Role: example_value
                      Handler: example_value
                      CodeSize: 10
                      Description: A sample description.
                      Timeout: 10
                      MemorySize: 10
                      LastModified: example_value
                      CodeSha256: example_value
                      Version: example_value
                      DeadLetterConfig:
                        TargetArn: example_value
                      Environment:
                        Variables: example_value
                        Error: {}
                      KMSKeyArn: example_value
                      TracingConfig:
                        Mode: Active
                      MasterArn: example_value
                      RevisionId: '500123'
                      Layers:
                      - {}
                      State: Pending
                      StateReason: example_value
                      StateReasonCode: Idle
                      LastUpdateStatus: Successful
                      LastUpdateStatusReason: example_value
                      LastUpdateStatusReasonCode: example_value
                      PackageType: Zip
                      ImageConfigResponse:
                        ImageConfig: {}
                        Error: {}
                      Architectures:
                      - {}
                      EphemeralStorage:
                        Size: 10
                      SnapStart:
                        ApplyOn: PublishedVersions
                        OptimizationStatus: true
                      RuntimeVersionConfig:
                        RuntimeVersionArn: example_value
                        Error: {}
                      LoggingConfig:
                        LogFormat: JSON
                        ApplicationLogLevel: TRACE
                        SystemLogLevel: DEBUG
                        LogGroup: example_value
                    Code:
                      RepositoryType: example_value
                      Location: example_value
                      ImageUri: example_value
                      ResolvedImageUri: example_value
                    Tags: example_value
                    Concurrency:
                      ReservedConcurrentExecutions: 10
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Getfunction404Example:
                  summary: Default getFunction 404 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Getfunction429Example:
                  summary: Default getFunction 429 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      operationId: deleteFunction
      summary: Aws Lambda Delete a Function
      description: Deletes a Lambda function. To delete a specific function version, use the Qualifier parameter. Otherwise, all versions and aliases are deleted. To delete Lambda event source mappings that invoke a function, use DeleteEventSourceMapping.
      tags:
      - Functions
      parameters:
      - $ref: '#/components/parameters/functionName'
      - $ref: '#/components/parameters/qualifier'
      responses:
        '204':
          description: Function deleted successfully
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Deletefunction404Example:
                  summary: Default deleteFunction 404 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '409':
          description: Resource is in use
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Deletefunction409Example:
                  summary: Default deleteFunction 409 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Deletefunction429Example:
                  summary: Default deleteFunction 429 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2015-03-31/functions/{FunctionName}/configuration:
    get:
      operationId: getFunctionConfiguration
      summary: Aws Lambda Get Function Configuration
      description: Returns the version-specific settings of a Lambda function or version. The output includes the function name, runtime, role, handler, description, code size, memory, timeout, last modified date, code SHA-256 hash, version, VPC configuration, dead-letter queue configuration, environment variables, KMS key, tracing configuration, layers, state, state reason, and last update status.
      tags:
      - Functions
      parameters:
      - $ref: '#/components/parameters/functionName'
      - $ref: '#/components/parameters/qualifier'
      responses:
        '200':
          description: Function configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunctionConfiguration'
              examples:
                Getfunctionconfiguration200Example:
                  summary: Default getFunctionConfiguration 200 response
                  x-microcks-default: true
                  value:
                    FunctionName: example_value
                    FunctionArn: example_value
                    Runtime: nodejs18.x
                    Role: example_value
                    Handler: example_value
                    CodeSize: 10
                    Description: A sample description.
                    Timeout: 10
                    MemorySize: 10
                    LastModified: example_value
                    CodeSha256: example_value
                    Version: example_value
                    VpcConfig:
                      SubnetIds:
                      - {}
                      SecurityGroupIds:
                      - {}
                      VpcId: '500123'
                    DeadLetterConfig:
                      TargetArn: example_value
                    Environment:
                      Variables: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    KMSKeyArn: example_value
                    TracingConfig:
                      Mode: Active
                    MasterArn: example_value
                    RevisionId: '500123'
                    Layers:
                    - Arn: example_value
                      CodeSize: 10
                      SigningProfileVersionArn: example_value
                      SigningJobArn: example_value
                    State: Pending
                    StateReason: example_value
                    StateReasonCode: Idle
                    LastUpdateStatus: Successful
                    LastUpdateStatusReason: example_value
                    LastUpdateStatusReasonCode: example_value
                    PackageType: Zip
                    ImageConfigResponse:
                      ImageConfig:
                        EntryPoint:
                        - {}
                        Command:
                        - {}
                        WorkingDirectory: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    Architectures:
                    - x86_64
                    EphemeralStorage:
                      Size: 10
                    SnapStart:
                      ApplyOn: PublishedVersions
                      OptimizationStatus: true
                    RuntimeVersionConfig:
                      RuntimeVersionArn: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    LoggingConfig:
                      LogFormat: JSON
                      ApplicationLogLevel: TRACE
                      SystemLogLevel: DEBUG
                      LogGroup: example_value
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Getfunctionconfiguration404Example:
                  summary: Default getFunctionConfiguration 404 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: updateFunctionConfiguration
      summary: Aws Lambda Update Function Configuration
      description: Modify the version-specific settings of a Lambda function. When you update a function, Lambda provisions an instance of the function and its supporting resources. After the update completes, subsequent invocations use the new configuration. Settings include memory, timeout, runtime, handler, environment variables, VPC, layers, and more.
      tags:
      - Functions
      parameters:
      - $ref: '#/components/parameters/functionName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFunctionConfigurationRequest'
            examples:
              UpdatefunctionconfigurationRequestExample:
                summary: Default updateFunctionConfiguration request
                x-microcks-default: true
                value:
                  Role: example_value
                  Handler: example_value
                  Description: A sample description.
                  Timeout: 10
                  MemorySize: 10
                  VpcConfig:
                    SubnetIds:
                    - {}
                    SecurityGroupIds:
                    - {}
                  Environment:
                    Variables: example_value
                  Runtime: example_value
                  DeadLetterConfig:
                    TargetArn: example_value
                  KMSKeyArn: example_value
                  TracingConfig:
                    Mode: Active
                  RevisionId: '500123'
                  Layers:
                  - example_value
                  EphemeralStorage:
                    Size: 10
                  SnapStart:
                    ApplyOn: PublishedVersions
                  LoggingConfig:
                    LogFormat: JSON
                    ApplicationLogLevel: example_value
                    SystemLogLevel: example_value
                    LogGroup: example_value
      responses:
        '200':
          description: Updated function configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunctionConfiguration'
              examples:
                Updatefunctionconfiguration200Example:
                  summary: Default updateFunctionConfiguration 200 response
                  x-microcks-default: true
                  value:
                    FunctionName: example_value
                    FunctionArn: example_value
                    Runtime: nodejs18.x
                    Role: example_value
                    Handler: example_value
                    CodeSize: 10
                    Description: A sample description.
                    Timeout: 10
                    MemorySize: 10
                    LastModified: example_value
                    CodeSha256: example_value
                    Version: example_value
                    VpcConfig:
                      SubnetIds:
                      - {}
                      SecurityGroupIds:
                      - {}
                      VpcId: '500123'
                    DeadLetterConfig:
                      TargetArn: example_value
                    Environment:
                      Variables: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    KMSKeyArn: example_value
                    TracingConfig:
                      Mode: Active
                    MasterArn: example_value
                    RevisionId: '500123'
                    Layers:
                    - Arn: example_value
                      CodeSize: 10
                      SigningProfileVersionArn: example_value
                      SigningJobArn: example_value
                    State: Pending
                    StateReason: example_value
                    StateReasonCode: Idle
                    LastUpdateStatus: Successful
                    LastUpdateStatusReason: example_value
                    LastUpdateStatusReasonCode: example_value
                    PackageType: Zip
                    ImageConfigResponse:
                      ImageConfig:
                        EntryPoint:
                        - {}
                        Command:
                        - {}
                        WorkingDirectory: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    Architectures:
                    - x86_64
                    EphemeralStorage:
                      Size: 10
                    SnapStart:
                      ApplyOn: PublishedVersions
                      OptimizationStatus: true
                    RuntimeVersionConfig:
                      RuntimeVersionArn: example_value
                      Error:
                        ErrorCode: example_value
                        Message: example_value
                    LoggingConfig:
                      LogFormat: JSON
                      ApplicationLogLevel: TRACE
                      SystemLogLevel: DEBUG
                      LogGroup: example_value
        '400':
          description: Invalid parameter value
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Updatefunctionconfiguration400Example:
                  summary: Default updateFunctionConfiguration 400 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Updatefunctionconfiguration404Example:
                  summary: Default updateFunctionConfiguration 404 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
        '409':
          description: Resource is in use or conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Updatefunctionconfiguration409Example:
                  summary: Default updateFunctionConfiguration 409 response
                  x-microcks-default: true
                  value:
                    Type: example_value
                    Message: example_value
                    Code: example_value
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /2015-03-31/functions/{FunctionName}/code:
    put:
      operationId: updateFunctionCode
      summary: Aws Lambda Update Function Code
      description: Updates a Lambda function's code. If code signing is enabled for the function, the code package must be signed by a trusted publisher. The function's code is locked when you publish a version. You cannot modify the code of a published version, only the unpublished version.
      tags:
      - Functions
      parameters:
      - $ref: '#/components/parameters/functionName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFunctionCodeRequest'
            examples:
              UpdatefunctioncodeRequestExample:
                summary: Default updateFunctionCode request
                x-microcks-default: true
                value:
                  ZipFile: example_value
                  S3Bucket: example_value
                  S3Key: example_value
                  S3ObjectVersion: example_value
                  ImageUri: example_value
                  Publish: true
                  DryRun: true
                  RevisionId: '500123'
                  Architectures:
                  - x86_64
      responses:
        '200':
          description: Updated function configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FunctionConfiguration'
              examples:
                Updatefunctioncode200Example:
                  summary: Default updateFunctionCode 200 response
                  x-microcks-default: true
                  value:
                    FunctionName: example_value
                    FunctionArn: example_value
                    Runtime: nodejs18.x
                    Role: example_value
                    Handler: example_value
                    CodeSize: 10
                    Description: A sample description.
                    Timeout: 10
                    MemorySize: 10
              

# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/aws-lambda/refs/heads/main/openapi/aws-lambda-functions-api-openapi.yml