Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I cant get update lambda serverless express with pipe atlassian/aws-lambda-deploy

Hi, 

I try to update my lambda with a bitbucket pipeline. My proyect is built with node and express.  

The pipe is built correctly , but lambda does not work. But if I deploy with claudia js in a terminal, I have no problem and the lambda works fine

I think the problem is with de zip file, I'm not sure if params for the zip command are right. The content size of lambda is smaller when is deployed with pipe than is deployed with claudia js. In AWS console, when the pipe is executed, the lambda code is visible and it`s seems right, but when is executed by claudia, code is not visible.

Anyone knows if my pipe code is right to execute an express serverless?

This is my  step pipeline yaml file:

- step: 
# Build and package the Lambda function.
name: Build and package
script: - apt-get update && apt-get install -y zip
-
zip code.zip *
# Upload the Lambda - make the version number
# available to subsequent steps via artifacts.
-
pipe: atlassian/aws-lambda-deploy:0.6.0
variables:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
FUNCTION_NAME: 'my-function'
COMMAND: 'update'
ZIP_FILE: 'code.zip'
# Read results from the update pipe into environment variables
-
apt-get install -y jq
-
BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes"
-
VERSION=$(jq --raw-output '.Version' $BITBUCKET_PIPE_SHARED_STORAGE_DIR/aws-lambda-deploy-env)
- pipe: atlassian/aws-lambda-deploy:0.6.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
FUNCTION_NAME: 'my-function'
COMMAND: 'alias'
ALIAS: 'development'
VERSION: '${VERSION}'

2 answers

1 accepted

1 vote
Answer accepted

Hi,

I've found my issue. I wasn´t executed npm install command before the pipe.

Now is working. 

 

Thanks!

0 votes
- step: name: Deploy to test deployment: test # trigger: manual # Uncomment to make this a manual deployment. script: - echo "Deploying to test environment"

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

ThinkTilt is joining the Atlassian Family!

This morning, Atlassian announced the acquisition of ThinkTilt , the maker of ProForma, a no-code/low code form builder with 700+ customers worldwide. ThinkTilt helps IT empower any team in their or...

416 views 19 23
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you