Install FormKiQ with SAM CLI

FormKiQ Core was built using the [AWS Serverless Application Model (SAM)](https://aws.amazon.com/serverless/sam/) framework.

The Serverless Application Model Command Line Interface (SAM CLI) is an extension of the AWS CLI that adds functionality for deploying serverless applications.

Prerequisite

To use SAM CLI, you will need to install the following tools:

Get Latest Release

The latest version of FormKiQ Core can be found on the Releases page on Github.

Download the file with the naming convention of: formkiq-core-X.X.X.zip

Once downloaded, unzip the file in its own directory.

INSTALL.md
LICENSE
template.yaml
...

Deploy to AWS

To deploy FormKiQ Core, run the following command in the same folder as the template.yaml file.

sam deploy --guided --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND CAPABILITY_NAMED_IAM

The command will package and deploy your application to AWS, with a series of prompts:

Argument

Description

Default Value

Stack Name

The name of the stack to deploy to CloudFormation. This should be unique to your account and region

formkiq-core-<AppEnvironment>

AdminEmail

Set the admin email address. During the FormKiQ installation, this email address will be automatically set up with administrator access.

AppEnvironment

AppEnvironment is a unique identifier for FormKiQ installations. The identifier should provider context to what kind of information is contained in the installation, IE: prod, staging, dev.

prod

EnablePublicUrls

Whether to enable "/public" endpoints.

false

PasswordMinimumLength

Minimum Password Length

8

PasswordRequireLowercase

Whether Password requires a lowercase letter

false

PasswordRequireNumbers

Whether Password requires a number

false

PasswordRequireSymbols

Whether Password requires a symbol

false

PasswordRequireUppercase

Whether Password requires a uppercase letter

false

VpcStackName

Optional: The name of the FormKiQ VPC CloudFormation stack

null

TypesenseApiKey

Optional: API Key to access the Typesense server

null

CapacityProvider

Optional: CapacityProvider used by AWS Fargate service

FARGATE_SPOT

  • Confirm changes before deploy: If set to yes, any change sets will be shown to you before execution for manual review. If set to no, the AWS SAM CLI will automatically deploy application changes.

  • Allow SAM CLI IAM role creation: FormKiQ Core’s AWS SAM templates create AWS IAM roles required for the AWS Lambda function(s) included to access AWS services. The permissions are passed in by the sam deploy command above. Set Value to 'Y'

  • Save arguments to samconfig.toml: If set to yes, your choices will be saved to a configuration file inside the project, so that in the future you can just re-run sam deploy without parameters to deploy changes to your application.

Once you have set all of these options, SAM CLI will create a changeset and will display a list of all actions that will be performed as part of the changeset. If you have set "confirm changes before deploy" to "y", you will then be asked whether or nor to deploy this changeset. Choose "y" to complete the installation.

Once the FormKiQ Core stack has been deployed, you will be able to find your API Gateway Endpoint URL in the output values displayed after deployment.

Update

To update FormKiQ, follow the same instructions Deploy to AWS, specify the same Stack Name.

UnInstall

To delete the FormKiQ-core application that you created, use the AWS CLI. Assuming you used the suggested stack name (formkiq-core-<AppEnvironment>) for the stack name, you can run the following:

aws cloudformation delete-stack --stack-name formkiq-core-<AppEnvironment>