ots-aws 1.1.0
Install from the command line:
Learn more about npm packages
$ npm install @sniptt-official/ots-aws@1.1.0
Install via package.json:
"@sniptt-official/ots-aws": "1.1.0"
About this version
Initialise a new CDK app if you don't already have one:
mkdir dev; cd dev
cdk init app --language typescript
npx cdk bootstrap --profile dev
Make sure you're authenticated with the GitHub registry (GitHub PAT with registry:read
access is enough):
npm config set @sniptt-official:registry https://npm.pkg.github.com
npm config set -- '//npm.pkg.github.com/:_authToken' $GITHUB_TOKEN
Install the ots-aws
construct:
npm i @sniptt-official/ots-aws
Add the ots-aws
construct to your stack:
import { Ots } from '@sniptt-official/ots-aws';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
export class DevStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const ots = new Ots(this, 'Ots');
}
}
Deploy:
npx cdk deploy DevStack --profile dev
Grab your API Gateway URL, API key and test:
curl ...
npm ci
npm run build
npm test
cd lambda-functions
npm test