Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Serverless Deploy of Java AWS Lambda Function

Jeba Bhaskaran
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 14, 2019

I am trying to build and deploy an Java lambda function using serverless.  I can deploy from local but not able to deploy from pipeline.

image: maven:3.6.1-jdk-8

pipelines:
default:
- step:
caches:
- maven
script:
- mvn -B verify # -B batch mode makes Maven less verbose
- step:
image: node:8
script:
- export AWS_ACCESS_KEY_ID=$DEV_AWS_ACCESS_KEY_ID
- export AWS_SECRET_ACCESS_KEY=$DEV_AWS_SECRET_ACCESS_KEY
- npm install serverless -g
- npm install serverless-offline -g
- sls deploy

 

The error is 

Serverless Error --------------------------------------- Serverless plugin "serverless-offline" not found. Make sure it's installed and listed in the "plugins" section of your serverless config file. Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Issues: forum.serverless.com Your Environment Information --------------------------- OS: linux Node Version: 8.16.0 Serverless Version: 1.42.2

 

1 answer

0 votes
florentbo2
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 3, 2019

Hi,

I never tried to do you stuff, but on my locale machine, the only thing I needed was:

Install Node.
Install the serverless CLI: npm -g install serverless
Install the maven CLI. If you have brew, it’s brew install maven.

https://medium.com/@serverlessguru/move-your-spring-boot-api-to-aws-lambda-and-reduce-costs-by-100-4a1884cc08d7

So serverless-offline is not needed.

Regards

Florent

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events