Serverless Examples – A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more.
The main difference of my project is that I wrote the service in multiple files using modules for better testability.
I can package and deploy from my Mac, but I'm implementing some CI/CD using Bitbucket Pipelines for my project. And as I use bcrypt for password generation and user authentication I need to use a docker image for bitbucket-pipelines that mimics the AWS AMI used for AWS Lambda deploys.
The main problem is that when I use the serverless deploy on the Linux machine, the command returns an error in the Bitbucket Pipelines:
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: UserAuthLambdaFunction
- Unzipped size must be smaller than 262144000 bytes.
Stack Trace --------------------------------------------
An example of my setup is the following:
Files and folders:
__tests__/ # jest folder for model and services test
bitbucket-pipelines.yml
config/
models/
package.json
serverless.yml
services/
userService.js
yarn.lock
My service currently only does the signup part and return an authorization token as the response body. I need to know how the Mac deploys successfully (but with error from native modules as bcrypt being generated with the different architecture needed), and the Linux (AWS AMI) one can't deploy.
I have a similar scenario as the example AWS Node REST API + MongoDB.
The main difference of my project is that I wrote the service in multiple files using modules for better testability.
I can package and deploy from my Mac, but I'm implementing some CI/CD using Bitbucket Pipelines for my project. And as I use
bcrypt
for password generation and user authentication I need to use a docker image for bitbucket-pipelines that mimics the AWS AMI used for AWS Lambda deploys.The main problem is that when I use the
serverless deploy
on the Linux machine, the command returns an error in the Bitbucket Pipelines:An example of my setup is the following:
Files and folders:
My
serverless.yml
file is setup as this:My
userService.js
handler file is setup as this:My service currently only does the signup part and return an authorization token as the response body. I need to know how the Mac deploys successfully (but with error from native modules as
bcrypt
being generated with the different architecture needed), and the Linux (AWS AMI) one can't deploy.