AWS Setup
IAM requirements
Section titled “IAM requirements”Uniflow uses AWS CDK to deploy ~15 AWS services. The deploying user/role needs permissions to create and manage these resources.
Option A: Admin access (quickest)
Section titled “Option A: Admin access (quickest)”For initial setup, attach the AdministratorAccess managed policy. This is the fastest way to get started.
Option B: Least-privilege (recommended for production)
Section titled “Option B: Least-privilege (recommended for production)”Create a custom IAM policy with permissions for:
cloudformation:*— Stack managementlambda:*— Function managementapigateway:*— API Gatewaydynamodb:*— Table managementkinesis:*— Stream managementfirehose:*— Delivery streams3:*— Bucket managementsqs:*— Queue managementglue:*— Glue PySpark jobsevents:*— EventBridge rulescognito-idp:*— User poolcloudfront:*— Distributionathena:*— Query managementglue:*— Catalogkms:*— Encryption keysiam:*— Role/policy creationlogs:*— CloudWatch logs
CDK bootstrap
Section titled “CDK bootstrap”CDK requires a one-time bootstrap per account/region:
npx cdk bootstrap aws://123456789012/us-east-1This creates an S3 bucket and IAM roles that CDK uses to deploy assets.
Deployment
Section titled “Deployment”# Generate configuniflow init
# Deploy all resourcesuniflow deployThe first deployment takes 5-10 minutes. Subsequent updates are faster.
Stack outputs
Section titled “Stack outputs”After deployment, uniflow status shows:
| Output | Description |
|---|---|
IngestEndpoint | API Gateway URL for sending events |
ManagementApiEndpoint | URL for the management API |
AdminUIUrl | CloudFront URL for the admin dashboard |
TableName | DynamoDB table name |
EventsBucket | S3 bucket for raw events |
Multi-region
Section titled “Multi-region”Deploy to multiple regions by running uniflow init with different regions and stack names:
# US Eastuniflow init # region: us-east-1, stackName: UnifowStack-USE1uniflow deploy
# EU Westuniflow init # region: eu-west-1, stackName: UnifowStack-EUW1uniflow deployEach deployment is fully independent.
Teardown
Section titled “Teardown”uniflow destroyThis removes all CloudFormation-managed resources. S3 buckets with data are preserved by default (RETAIN policy). Delete them manually if needed:
aws s3 rb s3://uniflow-events-123456789012 --forceCost optimization
Section titled “Cost optimization”- Development: Use
uniflow devwith LocalStack for free local testing - Staging: Deploy with minimal Kinesis shard count
- Production: All services use on-demand/pay-per-request billing, so costs scale with usage
See AWS Services for detailed cost estimates.