nanlabs / devops-reference

This repository contains different infrastructure components, CI/CD pipelines, automation tools among other resources that are used in different projects here at NaN Labs.
MIT License
44 stars 16 forks source link

examples/sls: Implement Twilio function using Twilio provider with Serverless Framework #52

Closed ulises-jeremias closed 1 year ago

ulises-jeremias commented 1 year ago

Use the following examples as reference:

julianpalmerio commented 1 year ago

A bit of information gathered for this topic:

The Official Guide talks about Twilio Functions and how to deploy them through Twilio CLI. Twilio Functions are part of Twilio Serverless, which is not the same as Serverless Framework.

Following the Official Guide we can deploy Twilio Functions locally, debug them and deploy them in Twilio Serverless through this Twilio Serverless Plugin Also following the guide we can use Typescript as runtime.

Regarding the using Serverless Framework to deploy Twilio Functions, it is complicated because there is still not very good support for this in the serverless framework community.

Anyway, we can follow this guide to deploy Twilio Functions with serverless framework using the Twilio Provider. To use this provider we need to use The Serverless Framework Plugin: serverless-twilio-runtime. Here is the git repository with more documentation: serverless-twilio-runtime (GIT)

Some of the problems I have encountered are: