Regional
Twilio's Global Infrastructure enables you to ensure that your application’s Twilio data remains within the corresponding territory at all times, and that your commands execute with the shortest possible round trips to Twilio's servers. Twilio Regions are supported by the CLI as well, so you can continue to use the CLI without worrying about data residency.
Set Region
Via profiles
You can specify the target Region for a profile using the --region
flag. For example:
twilio login --region au1
Via environment variables
Alternatively, you can specify the target Region by setting it as an environment variable. This will take precedence over the region
setting of the active profile:
export TWILIO_REGION=au1
Set Edge
In addition to Regions, you can control which geographic location your network request enters and exits Twilio's platform by defining an Edge Location. The Edge Location used by the CLI can be controlled either by setting it as a configuration, or with an environment variable.
Via configuration
The Edge Location used by the CLI can be controlled by setting it as a configuration:
twilio config:set --edge=sydney
Via environment variables
Alternatively, you can specify the target Edge Location by setting it as an environment variable. This will take precedence over any value set with twilio config
:
export TWILIO_EDGE=sydney
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.