Skip to main content

Deploy from Source

Neo is provisioned with AWS CDK 2.x.

Prerequisites

Before working on the Neo cloud you need:

ToolMin versionWhy
AWS CLI2.xInstall. Used by cdk and the test scripts.
AWS CDK2.xInstall. Provisions the stacks.
Go1.22.6+Install. Builds the Lambda binaries.
Python 33.10+Install. Runs the CDK app and integration tests.

You'll also need an AWS account with permissions to create the resources defined in the CDK app — IAM roles, Lambda functions, DynamoDB tables, IoT policies, Cognito user pools, S3 buckets.

AWS region and profile

To target a specific region or named profile, export them before running any make target:

export AWS_REGION=ap-south-1
export AWS_PROFILE=dev

Both default to whatever your CLI config has — default profile and the configured region.

Python virtual environment

The CDK app and integration tests share a Python venv:

python3 -m venv myenv
source myenv/bin/activate
pip3 install -r requirements.txt

First-time setup

make setup # bootstrap CDK for both espuser and rmng stacks

This creates the S3 bucket CDK uses for assets and runs cdk bootstrap for the chosen account/region.

Deploy

make deploy # build Lambdas + deploy all stacks
make diff # cdk diff
make synth # synthesise CloudFormation templates

Set AWS_REGION and AWS_PROFILE before running these targets — see AWS region and profile above.

CDK conventions

  • Use self.region in resource names for global AWS services (S3, IAM, etc.).
  • Stateful resources go in *_base_stack.py; stateless ones in *_core_stack.py.
  • Reusable constructors live in app_common.py.

After deployment

A sample test dataset of users and devices can be added to the deployment to quickly start with development/experimentation. Run python3 cli/morpheus.py --setup-test-data once to seed test users, devices, and certificates from test_config.json. Now you may use various commands from python3 cli/morpheus.py to exercise the deployment. Please refer to the Morpheus documentation for more details.

Integration Tests

A full integration test suite is available, continue to Run integration tests for more details.