GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - parksaustralia/uluru-daily-weather: Daily email via SendGrid to Uluṟu-Kata Tjuṯa CTOs with the weather information.

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
.devcontainer
.devcontainer
 
 
.vscode
.vscode
 
 
bin
bin
 
 
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
README.md
README.md
 
 
cdk.json
cdk.json
 
 
jest.config.js
jest.config.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
renovate.json
renovate.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Uluṟu daily weather email

Run daily in AWS Lambda this code generates a draft email in SendGrid pulling the BOM forecast data for Yulara (Uluṟu).

It retrieves the Handlebars template from Sendgrid and executes a first pass render with both the forecast data and also the fixed annual sunrise, sunset and opening hours data.

It posts the rendered HTML back to SendGrid as a draft email. The mailing lists and unsubscribe groups are set automatically.

The code runs daily at 4:15 pm Darwin time. After which the UKTNP staff can log into SendGrid to review the draft message, adjust any messaging where required, and press send.

This project is set up and deployed using AWS CDK.

Development

This project requires Node.js 12.x and that you have AWS credentials configured in order to deploy.

  • npm install
  • npm run test
  • npm run debug

The project includes a Github Codespaces config that will create an environment with all of the require dependencies installed. All that is required after creating the codespace is to run aws configure and enter your AWS API keys and region.

You may also like to set your SendGrid API key for local development and debugging:

export SENDGRID_API_KEY="SG.<snip>"

Deployment

First the SendGrid API key must be set in the account using AWS secrets manager.

Then you can deploy the stack with:

npm run cdk deploy

SendGrid API key

The SendGrid API key is stored in AWS Secrets Manager and is pulled when deploying the application.

To set the key:

aws secretsmanager create-secret --name uluruWeather/sendgridApiKey --description "SendGrid API key" --secret-string "<key>"

To change the key, the secret needs to first be updated and then the CDK stack redeployed:

aws secretsmanager update-secret --name uluruWeather/sendgridApiKey --description "SendGrid API key" --secret-string "<key>"

About

Daily email via SendGrid to Uluṟu-Kata Tjuṯa CTOs with the weather information.

Topics

cdkforecast-datasendgridserverlesstypescript

Resources

Readme
Activity
Custom properties

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.