Deploying Drift Apps on AWS using AWS Lambda and API Gateway

Chris Buonocore
Jul 12, 2018 · 9 min read

Intro to Serverless

Three Steps to App

Making the Lambda Function

Creating a new Lambda function
Setting the Lambda function template
Filling in the lambda configuration
Creating a new Gateway from the Lambda creation wizard.
Connecting API Gateway to your Lambda function. Hey that wasn’t too bad.
Upload your Lambda function code and any required environment variables.
Needed permissions for the Lambda function.

Defining the API Routes (API Gateway)

We’ll be using the default /definely endpoint which has Lambda proxy already enabled for routing headers, body, etc. from API Gateway. All we need to do is deploy.
URL for deployed API
Inserting the gateway url to be used by the messages webhook. You will also need to set the OAuth url.

Handling and Storing OAuth tokens

If successful, you should see the success.html webpage render from your lambda callback.
Screenshot of my Dynamo table — you should see a new entry in your table after authenticating.
Photo by rawpixel on Unsplash

The Elephant in the Room

OAuth Callback section for my app
Setting a custom OAuth redirect URL

Submitting your app to the Drift app store.

Drift App Store
Submitting the App for review

Wrapping Up

Joining our Dev Slack:


Revisiting the App Source code

OAuth Documentation

As always, ping us on slack if you have questions

Chris Buonocore

Written by

Technologist, Investor, and Human. Feel free to disagree with as much or as little as I say. Currently @Drift working on the API Platform.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade