Simple example projects that show how to use ClaudiaJs
Switch branches/tags
Nothing to show
Clone or download
Latest commit fe3d1a6 Oct 14, 2018
Permalink
Failed to load latest commit information.
alexa-skill bump all examples to v4 Apr 9, 2018
api-gw-geolocation bump all examples to v4 Apr 9, 2018
async-await-and-babel bump all examples to v4 Apr 9, 2018
aws-mobile-analytics bump all examples to v4 Apr 9, 2018
babel bump all examples to v4 Apr 9, 2018
binary-content bump all examples to v4 Apr 9, 2018
bot-with-buttons bump all examples to v4 Apr 9, 2018
cors-settings bump all examples to v4 Apr 9, 2018
custom-authorizers bump all examples to v4 Apr 9, 2018
deploy-proxy-api bump all examples to v4 Apr 9, 2018
detecting-context bump all examples to v4 Apr 9, 2018
dynamodb-example bump all examples to v4 Apr 9, 2018
env-variables bump all examples to v4 Apr 9, 2018
express-app-lambda bump claudia version Oct 13, 2018
fastify-app-lambda bump all examples to v4 Apr 9, 2018
github-repo-labels bump all examples to v4 Apr 9, 2018
graphql-example bump all examples to v4 Apr 9, 2018
hello-world bump all examples to v4 Apr 9, 2018
intercepting-requests bump all examples to v4 Apr 9, 2018
iot-topic-filter bump all examples to v4 Apr 9, 2018
pandoc-s3-converter using new pandoc binary May 24, 2018
recursive-invoke bump all examples to v4 Apr 9, 2018
s3-file-processing bump all examples to v4 Apr 9, 2018
sam-packaging claudia pack example Jun 7, 2018
simple-bot bump all examples to v4 Apr 9, 2018
slack-delayed-response bump all examples to v4 Apr 9, 2018
stripe-checkout-payment bump all examples to v4 Apr 9, 2018
svg-to-pdf-s3-converter bump all examples to v4 Apr 9, 2018
twilio-shippo-webhook bump all examples to v4 Apr 9, 2018
using-npm-modules using superb 3.0 syntax Jul 23, 2018
web-api-custom-cors bump all examples to v4 Apr 9, 2018
web-api-custom-headers bump all examples to v4 Apr 9, 2018
web-api-custom-status-code bump all examples to v4 Apr 9, 2018
web-api-generic-handlers bump all examples to v4 Apr 9, 2018
web-api-lambda-context bump all examples to v4 Apr 9, 2018
web-api-postdeploy-configuration bump all examples to v4 Apr 9, 2018
web-api-postdeploy bump all examples to v4 Apr 9, 2018
web-api using superb 3.0 syntax Jul 23, 2018
web-serving-html using superb 3.0 syntax Jul 23, 2018
web-serving-universal-react fix mention of project Aug 24, 2017
website-email-alert bump all examples to v4 Apr 9, 2018
.eslintrc.json iot example Feb 19, 2017
.gitignore bump all examples to v4 Apr 9, 2018
ISSUE_TEMPLATE.md issue template Feb 18, 2017
README.md Update README.md Jul 8, 2018

README.md

Claudia.js Example projects

Hello world

  • Hello World – shows a trivial Node.js Lambda function and how to set up deployment using Claudia.js
  • Web API – a simple REST api, shows how to configure and deploy an API Gateway interface along with the Lambda function

Common Development tasks

  • Using NPM Modules – a slightly more complex function, shows how to deploy third party dependencies using Claudia.js
  • Using Babel – shows how to deploy transpiled Babel code
  • Environment Variables – setting and using Lambda environment variables
  • Detecting Context – detect if a function was called for development or production, in order to load the right configuration
  • Recursive invocation – an example of how Lambda can asynchronously call itself to work around timing limitations
  • Packing for AWS SAM – an example of how to use Claudia to prepare packages for deployment using CloudFormation and AWS SAM

Web API

  • Web Serving HTML – shows how to change error and success content types and response codes, and how to perform browser redirects
  • Generic handlers – shows how to capture dynamic paths and set up handlers for any content type easily
  • Custom response codes – shows how to change status codes for response
  • Custom Headers – shows how to return custom headers from API responses
  • Custom CORS origins – shows how to control allowed CORS origins/headers
  • Intercepting requests – an example showing how to prevent or modify requests
  • Post-deploy variable configuration – shows how to set up post-deploy hooks to prompt users for stage variables
  • Generic post-deploy steps – shows how to set up post-deploy hooks for automatic configuration
  • Using Lambda Context – shows how to access the Lambda Context object from projects built using claudia-api-builder
  • DynamoDB CRUD – a simple document store, shows how to use DynamoDB and connect it to a CRUD REST API. Also shows how to configure a single Lambda function to work with different resources for development, testing and production.
  • GraphQL Endpoint – GraphQL CRUD operations, using DynamoDB for persistence.
  • GitHub Repository Labels – a simple image server, shows how to map URL path components to arguments, how to customise response types and how to connect to third party REST APIs
  • Using AWS Mobile Analytics for server-side events – log events into AWS Mobile Analytics for easy internal telemetry
  • Custom Authorizers – a simple example of how to set up custom authorizers in API Gateway
  • Geo location – shows how to retrieve the country where your users originated the request
  • Binary Content – shows how to configure API Gateway to send or receive binary data
  • Twilio & Shippo webhook – shows how to create an API endpoint for processing webhook updates using Twilio and Shippo

Event processing

  • S3 File Processing – an example service that converts files uploaded to S3; shows how to wire up Lambda to respond to S3 events
  • IOT Topic Filters – an example how to trigger a function when a message is posted to an IOT Data Topic
  • Pandoc S3 Converter – a more complex example that converts S3 files to .docx using Pandoc
  • SVG to PDF S3 Converter – convert SVG files uploaded to S3 to PDF format using RSVG and Cairo
  • Website Email Alert – periodically check a URL and send an e-mail if it is not available; shows how to send e-mails using SES and set up Lambda functions as scheduled recurring events

Proxy API

Chat-bots

  • Simple Bot – an example demonstrating how to receive and respond with simple text messages
  • Facebook Messenger Bot with Buttons – an example showing how to create more complex platform specific messages, for example Facebook buttons
  • Space Explorer Bot – uses NASA's API to get the data and images about the space, shows how to use Facebook Template builders for response messages.
  • Slack Delayed Reply – an example showing how to send delayed and multiple replies for Slack slash commands.
  • Alexa Skill – an Amazon Echo (Alexa) skill sample that spells out English words

Examples in other repositories

More information

For more information on the Web API configuration syntax, check out the Claudia API Builder project. For more information on Claudia.js options, see the Command Line Usage.

Join the chat at https://gitter.im/claudiajs/claudia

Prerequisites

To get started, make sure your credentials are configured. See the ClaudiaJS Getting Started Guide for more information.

AWS Lambda currently runs Node.js version 8 and 6 (you can choose the runtime with --runtime when creating the function). It's best to use the same version for testing and deployment.