Skip to content

bug: Unable to write to HTTP response from Golang Lambda with Function URL #12889

@sno6

Description

@sno6

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have deployed a Golang Lambda that is set up to be a streaming function URL. When hitting the deployed URL my code will complete, but the client will receive the following error instead of the data the URL wrote:

{"__type": "InternalError", "message": "exception while calling lambda with unknown operation: Extra data: line 1 column 222 (char 221)"}

FWIW I have similar code running in production on AWS Lambda so I strongly believe the problem is on Localstack side.

I have a minimal reprod repo for y'all here: https://github.com/sno6/localstack-lambdaurl-issue

Expected Behavior

I expected cURL to receive the data that the lambda wrote to the response writer. Also, I expect that using the -N flag would result in the response streaming in to the client.

How are you starting LocalStack?

With the localstack script

Steps To Reproduce

  1. Clone https://github.com/sno6/localstack-lambdaurl-issue
  2. Run make build
  3. Deploy the stack using cdklocal.
  4. curl the deployed function url.

Environment

- OS: Mac OSX
- LocalStack:
  LocalStack version: LocalStack CLI 4.2.0

Anything else?

No response

Metadata

Metadata

Assignees

Labels

aws:lambdaAWS Lambdasemver: majorBreaking changes which can be included in a major release onlystatus: backlogTriaged but not yet being worked ontype: bugBug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions