Skip to content

Instantly share code, notes, and snippets.

@pbzona
Created April 30, 2018 22:28
Show Gist options
  • Save pbzona/04ad8c80d58b3d73a9c06423359a504f to your computer and use it in GitHub Desktop.
Save pbzona/04ad8c80d58b3d73a9c06423359a504f to your computer and use it in GitHub Desktop.
Serverless Weather pt 4
// Construct a format for the message - since we're using SNS, the maximum length will be 140 chars
const message = `Tomorrow's weather: \nHi: ${high}\xB0\nLo: ${low}\xB0\nRain: ${precip}%\n\n${summary}`;
// Create an object to define how we'll invoke our call to SNS
const params = {
Message: message,
TopicArn: TOPIC
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment