Skip to content

Feature request: Support Lambda Function Urls in local start-api #4299

@lambrospetrou

Description

@lambrospetrou

Describe your idea/feature/enhancement

With the addition of Lambda Function URLs, we don't need API Gateway for full APIs. However, the sam local start-api command does not support that yet, and fails with the error that no API exists.

An example of such SAM template can be found in https://github.com/lambrospetrou/aws-playground/blob/master/aws-lambda-url-and-fly-golang-proxy/aws-iac/sam-template.yml. Relevant excerpt below:

Resources:
  HelloFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: ../build/handler.zip
      Handler: handler
      Runtime: go1.x
      MemorySize: 512
      FunctionUrlConfig:
        AuthType: NONE

Proposal

Ideally, the cli should be able to add the Function URLs defined as part of the expose API, or even expose them in different ports if we want them separate from a potential API Gateway definition.

Things to consider:

  1. Will this require any updates to the SAM Spec. It shouldn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions