Skip to content

Releases: Inqnuam/serverless-aws-lambda

4.6.6

06 Nov 05:21
Compare
Choose a tag to compare
  • fix: improved alb request query string parsing
  • updated docs

4.6.5

22 Oct 20:16
Compare
Choose a tag to compare
  • chore: provide common js globals to esm context
  • chore: updated AWS Stream Response behaviour to match AWS's new behaviour
  • chore: updated dependencies
  • fix: exit with code 1 when a plugin 'afterDeploy' hook crashs
  • fix: SQS plugin doesn't correctly parses Queue ARN declared in CloudFormation template
  • feat: added support for CreateBucket, DeleteBucket, DeleteObjects, HeadBucket, ListBuckets, ListObjects and ListObjectsV2 commands for local S3 plugin.
  • feat: added support for AWS CLI s3 and s3api commands

4.6.4

01 Oct 19:12
Compare
Choose a tag to compare
  • Router (express)
    • feat: expose cookies and headers set with res.cookie() and res.setHeader()
    • fix: in some cases error middleware may receive response object instead of request object as second argument
  • SQS Plugin
    • fix: additional verifications for MessageBody, MessageAttributes and MessageSystemAttributes
    • fix: added support for Binary type attributes
    • fix: explicit message for missing id in batch actions
  • SNS Plugin
    • fix: additional verifications for Message, and MessageAttributes
    • fix: added support for Binary type attributes
  • chore
    • updated dependencies
    • updated README

4.6.2

14 Aug 04:19
Compare
Choose a tag to compare
  • updated esbuild
    with 0.19.0 esbuild shipped a bug which changed the behaviour of tsconfig baseURL
  • updated body-parser
    now Router body-parser plugin parses form-urlencoded requests correctly out of box
  • added a quick-start project example
    with the help of npx and degit you can now start a new project whitin seconds
  • introduce LOCAL label to remove chunk of code when deploying
    It's now possible to execute a chunk of code only when developing locally with LOCAL label statement. Previously it was possible by checking IS_LOCAL value from process.env or with some additional esbuild configuration, example:
export const handler = async (event)=> {

 if (process.env.IS_LOCAL == "true") {
   console.log("do something locally")
 }

 return {
  statusCode: 200,
  body: "Hello World!"
 }

}

now you can also achieve the same thing with a more elegant and less error prone with LOCAL label solution:

export const handler = async (event)=> {

 LOCAL: {
   console.log("do something locally")
 }

 return {
  statusCode: 200,
  body: "Hello World!"
 }

}

4.5.0

03 May 07:44
Compare
Choose a tag to compare

We are pleased to announce the release of version 4.5.0 of serverless-aws-lambda!

This new release includes several improvements and bug fixes to make the package more robust and flexible. Here are some of the key features and changes included in this release:

  • AWS Lambda Stream Response: With this update, "AWS Lambda Stream Response" is now supported out of the box, allowing you to easily test and debug your Lambda functions locally before deploying them to AWS.
  • ESM support: We've added support for ECMAScript Modules (ESM) in both local development and deployment modes. This enables you to use the latest JavaScript syntax and features in your code.
  • Skipping deployment of a function by stage: We've added the ability to skip the deployment of a function by "Serverless stage". This makes it easier to control which functions are deployed and when.
  • Reduced CPU usage in debug mode: We've optimized the package to reduce CPU usage in debug mode, making it more efficient and responsive.
  • Support for AWS Lambda Function URL: You can now make requests to AWS Lambda Function URLs by using the "@url/" prefix followed by the Lambda function name. This makes it easier to invoke your Lambda functions from other services and applications.
  • Dependency updates: We have updated our dependencies to ensure that the package is compatible with the latest versions of the Node.js runtime and other libraries.
  • Various bug fixes and refactoring: Fixed several bugs and made some code refactoring to improve the stability and performance of the package

Lambda Stream Response

AWS Lambda Introduces Response Payload Streaming.
This is now supported locally out of the box.
Deployment of your lambda will depend on this PR

Enabling ESM

To enable ESM for your packages set esbuild format to esm inside your defineConfig.
For local testing set your package.json's type to module

Omit deploy by stage

Currently we can skip a function deploy by setting online to false as in example below:

functions:
  debugUsageLambda:
    online: false
    handler: src/handlers/python.default
    runtime: python3.7

Now online supports also a string or array of string where you can specify deployment by desired stage, ex:

functions:
  debugUsageLambda:
    online: ["dev", "test"]
    handler: src/handlers/python.default
    runtime: python3.7

Function URL

Now Function URL can be invoked locally.
Request are made by adding @url/ prefix to your lambda name.
http://localhost:PORT/@url/lambdaName

4.4.1

24 Mar 00:08
Compare
Choose a tag to compare

-feat(core): free inactive Lambda resources

4.4.0

23 Mar 23:51
Compare
Choose a tag to compare
  • feat(plugins): added AWS Local SQS plugin
  • fixe(plugins): better Lambda SNS event filter

4.3.1

07 Mar 12:35
Compare
Choose a tag to compare
  • feat(package): include additional files into the final function package
functions:
  myAwsomeLambda:
    handler: src/handlers/awsomeLambda.default
    files:
      - ./resources/some/file.png
      - ./resources/anotherFile.pdf

4.3.0

03 Mar 08:02
Compare
Choose a tag to compare

Core:

  • added support for onError, onFailure and onSuccess on async invocations.
    • currently only Lambda and SNS are supported. SQS is planned.
  • added support for custom Client Context on lambda invocations.

defineConfig:

  • expose local ip adresse to plugins.

plugins:

  • s3 plugin now stores Content-Type and Cache-Control metadata locally to serve them later.