0.2.0 • Published 3 years ago

@strongishllama/faasd-cdk v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

faasd CDK

NPN version License: MIT GitHub Workflow Status

This project contains CDK constructs to deploy the faasd on AWS. Currently, there is only a single construct to deploy faasd to an EC2 instance. Be warned, this construct is very much in its prototyping phase.

Installation

Install this package with the following command.

npm install @strongishllama/faasd-cdk

Add the import at the top of your .ts file.

import * as faasd from '@strongishllama/faasd-cdk';

Then add the construct to your CDK stack, filling out the properties.

new faasd.Instance(this, 'faasd-instance', {
  region: 'ap-southeast-2',
  baseDomainName: 'example.com',
  fullDomainName: 'faasd.example.com',
  emailAddress: 'webmaster@example.com',
  vpc: ec2.Vpc.fromLookup(this, 'vpc', {
    vpcId: 'vpc-123456'
  }),
  amiId: 'ami-123456'
});

Testing

There are two types of tests in this project, CDK tests and deployment tests.

CDK tests test the CloudFormation output by the constructs, these can be run with the following command.

npm run test

Deployment tests import the constructs so they can be manually tested before making a package release. The plan is to automate these in the future.