serverless-http
serverless-http copied to clipboard
Support for the new feature AWS Lambda URLs
Hi there,
AWS has recently announce a new feature: https://aws.amazon.com/blogs/aws/announcing-aws-lambda-function-urls-built-in-https-endpoints-for-single-function-microservices/ And, Serverless Framework has also added support this: https://www.serverless.com/blog/aws-lambda-function-urls-with-serverless-framework
I have tried this feature with serverless-http and it doesn't seems to work. The server doesn't start:
DOTENV: Loading environment variables from .env.development:
Bundling with Webpack...
Watching for changes...
Starting Offline at stage dev (us-east-1)
Issues checking in progress...
Offline [http for lambda] listening on http://localhost:3002
Function names exposed for local invocation by aws-sdk:
* app: serverless-boilerplate-offline-app
No issues found.
Using the previous configuration I got this message when the server is ready:
Server ready: http://localhost:4000 🚀
Enter "rp" to replay the last request
No issues found.
This message never appears with the new function: AWS Lambda URLs.
I was able to get it to work with ExpressJS but it's not returning a response.
Actually, if you modify their example to return context.res it returns the response as it should.