Jira Connect App using atlassian-connect-express, deployed to a AWS Lambda function, best practice?

I’m working on a Jira connect app that should run in a AWS Lambda function with DynamoDB database.

I use atlassian-connect-express (node.js/express) with React/Redux client, which works fine locally. For deplying it to AWS Lambda I encounter some difficulties.

I’m using Claudiajs as framework for getting the express app to work in a lambda function. Atlassian-connect-express uses jugglingdb as database adapter for storing addon settings data. There is a jugglingdb adapter for DynamoDB, so I tried to use it, but it was last updated in 2014, so it didn’t import. I had to change some dependencies in the project. And now it imports and connects to the database. It creates tables but doesn’t read and write the setting data yet, so I’m working on that.

My question: Is anyone working with a similar setup? Or tried and found a better way? I mean: atlassian-connect-express -> AWS Lambda/DynamoDB sounds quite mainstream … Still I’m debugging module code to get it running.

My guess would be that the number of vendors using AWS Lambda is limited. Most are using Heroku or a VPS type of server resource on either Rackspace, Digital Ocean or simply spinning up EC2 nodes.

I’ve been using the AWS stack for a connect add-on but I use AWS API Gateway + Lambda + DynamoDB. This allows me to only use Lambda for code execution instead of request handling.

I’m also using the API Gateway, but just as a proxy. Did you divide your code into multiple lambda functions then? And did you use something other as Claudiajs as framework or provisioning tool, like serverless.com? Or did you just plain go to AWS?

I divide my code into multiple lambda functions, corresponding to the AWS API endpoints. So instead of using API gateway as a proxy and handle the routing in Lambda, I use the feature set of AWS.

api gateway > endpoint /x > lambda function x > DynamoDB
api gateway > endpoint /y > lambda function y > DynamoDB
api gateway > endpoint /z > lambda function z > DynamoDB

All the lambda functions are published to S3 in a single package. Upon publish, the package is zipped, uploaded to S3 and the lambda functions are automatically created/updated. I haven’t come around to automating the API gateway endpoint creation because there aren’t many endpoints to configure so this can still be done manually.

That seems like the natural way to do it with lambdas. Thanks for sharing. Would you recommend that over using Heroku with a “normal” express routing?

Heroku is a great way to start and has an excellent development workflow. I would definitely go with Heroku if you still have a choice. You can always migrate to AWS once the add-on becomes so popular that the costs/benefit ratio of Heroku becomes an issue :slight_smile:.

For me, the reason I choose AWS for my add-on is because I’m part of the AWS Activate program and I still have some credit to burn.

Thanks a lot. Great help. :slight_smile:

Hi Michael, we are looking to deploy on AWS in the near future using a similar architecture, and facing similar challenges. Did you have any joy updating the jugglingdb-dynamo adapter, or would you recommend another route?