aws / aws/aws-sam-cli

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

Open
#4,299 15 comments 40 reactions 0 assignees View on GitHub
maintainer/need-followup stage/pm-review type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Describe your idea/feature/enhancement

With the addition of [Lambda Function URLs](https://docs.aws.amazon.com/lambda/latest/dg/lambda-urls.html), we don't need API Gateway for full APIs. However, the [`sam local start-api`](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-local-start-api.html) 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 . Relevant excerpt below:

```yaml
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](https://github.com/awslabs/serverless-application-model). _It shouldn't._

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.