Skip to content
AWS lambda to scrape real time glucose values from dexcom.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Build Status



AWS SAM (lambda) function to scrape real time glucose values from dexcom every 5 minutes.

How does this work.

This aws lambda function impersonates a share app, and asks for the most recent blood glucose value.

Isnt there already an open source project that can retrieve dexcom date?

Yes! There is! Check it out here:
The reason I decided to make this was for a couple reasons:

  • Fun aws lambda project
  • data goes in dynamo instead of mlab, which is what nightscout uses
  • app is serverless, so may be cheaper than running the full nightscout app on heroku.

What will it deploy?

  • 1 AWS Python Lambda Function
  • 1 Dynamo DB Table

I cant tell where the source code is:

  • Navigate to the cron foler, there you should see a file called That is where the logic lies.

How Can I get Started:


  • AWS Acct
  • AWS CLI installed
  • Note: If you run aws --version from your terminal, your executable versions should be at least at these versions: aws-cli/1.16.161 Python/3.7.3 Darwin/18.5.0 botocore/1.12.151

How to Deploy:

Command Line

aws s3 mb s3://dev-dexcom-lambda
  • Package and deploy: (Make sure you update your dexcom user name and password)
aws cloudformation package --template-file /Users/danieldiaz/github/dexcom-lambda/.aws-sam/build/template.yaml --s3-bucket dev-dexcom-lambda --output-template-file packaged.yaml
 aws cloudformation deploy --template-file /Users/danieldiaz/github/dexcom-lambda/packaged.yaml --stack-name dev-dexcom-lambda --parameter-overrides DEXCOM_ACCOUNT_NAME=<YOUR-DEXCOM-USERNAME-HERE> DEXCOM_PASSWORD=<YOUR-DEXCOM-PASSWORD-HERE>
  • Done!
  • Navigate to your lambda console to see it executing, or go to the dynamodb table Glucose, to check out the data.


  • make sure you have the aws extension,
  • clone the project, right click on the template,
  • click deploy serverless template,
  • update the two parameters for dexcom username and password,
  • then Done!

Technology GOALS:

  • python
  • aws lambda
  • aws DynamoDB
  • Eventually switch to aws timetream?


This project is heavily based on the javascript project located here:
BY: Ben West

Random Helpful Links


  • Add License?
  • Add launchstack url?
  • lower read write capacity units for dynamodb
You can’t perform that action at this time.