Skip to content
Commits on Source (2)
variable "messagebird_access_key" { variable "messagebird_access_key" {
description = "MessageBird API access key." description = "MessageBird API access key."
sensitive = true
} }
# It would have been nicer to buy the phone number with Terraform and the # It would have been nicer to buy the phone number with Terraform and the
......
...@@ -10,7 +10,7 @@ TO_NUMBER = os.environ["TO_NUMBER"] ...@@ -10,7 +10,7 @@ TO_NUMBER = os.environ["TO_NUMBER"]
def handler(event, context): def handler(event, context):
message = event["Records"][0]["Sns"]["Message"] message = event["Records"][0]["Sns"]["Message"]
client = messagebird.Client(MSGBIRD_ACCESS_KEY) client = messagebird.Client(MSGBIRD_ACCESS_KEY)
client.messages_create( client.message_create(
message, message,
TO_NUMBER, TO_NUMBER,
) )
......