Skip to contentSkip to navigationSkip to topbar
On this page

Examples


(information)

This is a Twilio Labs project

This means this project is 100% open-source. You can find its source code in the Twilio Labs GitHub organization(link takes you to an external page).

We currently don't support the projects through our official support channels. But you are welcome to reach out to us on GitHub for any questions, issues or suggestions or to contribute to this project.

Learn more about Twilio Labs.

There is a lot you can do with the Twilio Serverless Toolkit. Here are some common examples of commands you might want to run.

There are two ways you can use the toolkit. If you are already using the Twilio CLI, you can install it via a plugin. Alternatively, you can use the toolkit as a standalone using twilio-run via npm or another Node.js package manager.

Throughout the docs we'll reference the Twilio CLI commands.


The list command

the-list-command page anchor

The list command allows you to list out:

  • Your services that are associated with your account
  • The environments for a specific service
  • Available builds in a specific service
  • As well as the functions , assets and variables currently deployed in a specific environment of a service

Here is some common tasks you might want to do with the list command.

List existing Serverless services

list-existing-serverless-services page anchor
1
# List all existing Serverless services in a formatted way:
2
3
twilio serverless:list services
4
5
# Only list the service SIDs and unique names in a table:
6
7
twilio serverless:list services --properties sid,unique_name

Promote a deployment from one environment to another

promote-a-deployment-from-one-environment-to-another page anchor
1
# Activates the same deployment that is on the "dev" environment to the "stage"
2
3
twilio serverless:promote \
4
--source-environment=dev \
5
--environment=stage

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.