A Talis library of AWS CDK constructs, implemented in TypeScript. Development uses
Node.js 26 (see .nvmrc); published code and Lambda bundles target Node.js 22+.
This project follows conventional commits, and enforces this choice during the build and release cycle.
Builds are conducted by CircleCI, and upon successful build of the main branch, semantic-release will generate a new release, an appropriate version (based on commits), and release-notes to cover the content of the commit log.
-
CDN Site Hosting constructs
CdnSiteHostingConstructfor static-site or single-page application hosting in S3 via CloudFront.CdnSiteHostingWithDnsConstructfor static-site or single-page application hosting in S3 via CloudFront, with DNS record provisioning
-
LambdaWorker- A serverless background job.
- Possible replacement for Resque Workers / Jobs
- Details here.
-
AuthenticatedApi(http api)- An API Gateway (v2)
- Built in optional Persona authentication on routes
- Point it at Persona with
personaOrigin(e.g."https://users.talis.com") or thepersonahost/scheme/port object
- Point it at Persona with
- Details here.
-
AuthenticatedRestApi(rest api)- An API Gateway Rest API
- Built in optional Persona authentication on routes
- Per-method required scopes via
requiredScope, as inAuthenticatedApi
- Per-method required scopes via
- Details here.
-
TalisAlarm- A CloudWatch
Alarmwith optionalonCallTeam,runbookUrlandlambdaFunctionNameprops, set as itsoncall_team,runbook_urlandlambda_functiontags - Its tags are propagated to EventBridge, where the rules deployed by cdk-aws-alarms page that Datadog On-Call team. No SNS topic is needed
- Tags only propagate when
onCallTeamis set, so alarms that don't page are unchanged - Tag values can only contain letters, digits, spaces and
_ . : / = + - @, so arunbookUrlwith?,&,#or%(e.g. a Confluence?pageId=link or a percent-encoded title) fails at synth. Link to a page with a plain path, e.g. on GitHub or a Confluence short link - Used by
LambdaWorker,AuthenticatedApiandAuthenticatedRestApi, which takeonCallTeamandrunbookUrland setlambdaFunctionNameon their Lambda alarms; theiralarmTopicis now optional LambdaWorkeralso takesrunbookUrls(dlqMessagesVisible,queueMessageAge) to link a different runbook per alarm, falling back torunbookUrl- Those constructs warn at synth (
talis-cdk-constructs:alarmsWithoutActions) when neitheralarmTopicnoronCallTeamis set, as their alarms then do nothing
- A CloudWatch
-
TalisCdkStack- Base stack to be extended by talis stacks
- Details here
-
TalisRegion- Aliases of AWS regions to the regions we deploy applications
- Details here
-
TalisDeploymentEnvironment- Aliases and resuable constants for referencing our specific deployment environments.
- Details here
ResourcePrefixer- Prefixs all AWS resources with the given prefix
- Details here
npm run buildcompilelib/todist/(only needed for publishing; tests and examples run the TypeScript source directly)npm run typechecktype-check everything (lib, lambdas, tests, examples)npm testrun all tests with Vitestnpm run unit-test/npm run infra-test/npm run integration-testrun one test suitenpm run lintcheck formatting (oxfmt), lint (oxlint) and types (tsc)npm run formatformat the code (oxfmt)
The integration tests are run against versions of the example projects deployed into AWS.
To run the integration tests locally:
export AWS_PREFIX=development-XX-where XX are your initials- The
authenticated-lambdaconstruct integration test needs the following environment variables for client/secrets. The values can be found by searching fortalis-cdk-construct integration testsin keeper.export TALIS_CDK_AUTH_API_MISSING_SCOPE_CLIENT=export TALIS_CDK_AUTH_API_MISSING_SCOPE_SECRET=export TALIS_CDK_AUTH_API_VALID_CLIENT=export TALIS_CDK_AUTH_API_VALID_SECRET=
- Following the instruction to deploy the
simple-lambda-workerin the examples readme. - Following the instruction to deploy the
simple-authenticated-apiin the examples readme. npm run integration-test