Skip to content

spdolan/cdk-lambda-cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js Lambda CRON - a CDK TypeScript project!

Overview

This project contains two CDK stacks:

  1. Nodejs Lambda, to create an ESBuild compiled Node.js Typescript lambda function. Default is to hit the US Treasury API for a thrilling reminder about the US National Debt.
  2. Event CRON, which by default generates an AWS event for each Weekday, which triggers an input Lambda function to execute.

Deployment

This repo assumes you have already followed the CDK scaffold for your already setup AWS Account CLI.

To deploy as-is, from the root of the repository:

# Check that cdk is installed correctly
which cdk
# install dependencies - alternatively `npm install`
yarn install
# head over to where the stacks are declared
cd bin
# deploy Event CRON stack, which depends upon the Lambda
cdk deploy USDebtCRONTrigger

The cdk.json file tells the CDK Toolkit how to execute your app.

Useful commands

  • yarn build compile typescript to js
  • yarn watch watch for changes and compile
  • yarn test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

About

AWS CDK scaffolded Weekday CRON trigger of a Lambda function. Defaults to a delightful message surrounding the current US National Debt.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published