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.
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: '[email protected]',
vpc: ec2.Vpc.fromLookup(this, 'vpc', {
vpcId: 'vpc-123456'
}),
amiId: 'ami-123456'
});
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.