You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you want to use encrypted API keys, see our [encrypted environment variables example](https://github.com/serverless/examples/tree/master/aws-node-env-variables-encrypted-in-a-file)
42
-
43
-
5. Invoke the function and send an SMS message
44
-
45
-
Update the `to` phone number the `event.json` file and `message` to send in the SMS
46
-
47
-
Then invoke the function with the serverless CLI. Set the `--path event.json` so the function knows where to send the SMS.
48
-
49
-
```bash
50
-
serverless invoke -f sendText --path event.json
51
-
```
52
-
53
-
6. (Optional) Deploy the front-end application
33
+
```yml
34
+
environment:
35
+
# replace these env variables with your twilio account values
If you want to use encrypted API keys, see our [encrypted environment variables example](https://github.com/serverless/examples/tree/master/aws-node-env-variables-encrypted-in-a-file)
42
+
43
+
5. Install the dependencies required by the service
44
+
```bash
45
+
npm i --only=prod
46
+
```
47
+
48
+
6. Deploy the service
49
+
```bash
50
+
serverless deploy
51
+
```
52
+
53
+
7. Invoke the function and send an SMS message
54
+
55
+
Update the `to` phone number the `event.json` file and `message` to send in the SMS
56
+
57
+
Then invoke the function with the serverless CLI. Set the `--path event.json` so the function knows where to send the SMS.
58
+
59
+
```bash
60
+
serverless invoke -f sendText --path event.json
61
+
```
62
+
63
+
8. (Optional) Deploy the front-end application
54
64
55
65
Update the `API_ENDPOINT` variable in the `/frontend/index.html` file and deploy the `/frontend` folder to a static host of your choice.
0 commit comments