question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:6
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
jamalmoircommented, Oct 17, 2022

This is a pretty big blocker for me. Not being able to develop locally without deploying test functions is very annoying.

Great to hear it’s being looked into.

2reactions
lucashuycommented, Oct 13, 2022

Thanks for raising this feature request! I’ll bring this up with the team to discuss about next steps

Read more comments on GitHub >

github_iconTop Results From Across the Web

FunctionUrlConfig - AWS Serverless Application Model
Creates a function URL with the specified configuration parameters. A function URL is an HTTPS endpoint that you can use to invoke your...
Read more >
FunctionUrlConfig - Amazon Serverless Application Model
Creates a function URL with the specified configuration parameters. ... For more information, see Function URLs in the Amazon Lambda Developer Guide.
Read more >
Tutorial - AWS Lambda Powertools for Python
Tutorial. This tutorial progressively introduces Lambda Powertools core utilities by using one feature at a time.
Read more >
Develop Lambdas And Debug Them Locally Using SAM
Serverless Applications are great, we can get a function up and ... Lambda is an AWS service that allows you to deploy small...
Read more >
AWS SAM Local Lambda invocations slow - Stack Overflow
sam local start-api --warm-containers EAGER --template ./sam-template.yml --host 0.0.0.0 ... This was added from this feature request: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found