Skip to content

Latest commit

 

History

History
101 lines (73 loc) · 3.05 KB

File metadata and controls

101 lines (73 loc) · 3.05 KB

ProactivePulse AI Deployment

This directory contains deployment scripts and resources for deploying ProactivePulse AI to AWS.

Deployment Options

1. Automated Deployment Scripts

We provide automated deployment scripts for both Unix/Linux/macOS and Windows:

  • deploy-aws.sh - Bash script for Unix/Linux/macOS
  • deploy-aws.bat - Batch script for Windows

These scripts automate the creation of required AWS resources:

  • S3 buckets for data storage
  • DynamoDB tables for structured data
  • Packaging of the backend application

To use the deployment scripts:

Unix/Linux/macOS:

chmod +x deploy-aws.sh
./deploy-aws.sh

Windows:

deploy-aws.bat

2. Manual Deployment

For more control over the deployment process, follow the detailed instructions in deployment.md.

Prerequisites

  1. AWS Account with appropriate permissions
  2. AWS CLI installed and configured
  3. Python 3.9+ for backend packaging
  4. Node.js 18+ for frontend deployment

Post-Deployment Configuration

After running the automated deployment scripts, you'll need to complete these manual steps:

  1. Enable Bedrock model access in the AWS console
  2. Create a Lambda execution role with appropriate permissions
  3. Deploy the Lambda function with the packaged backend
  4. Configure Lambda environment variables
  5. Set up API Gateway
  6. Deploy the frontend application

Environment Variables

The deployment scripts will create resources with timestamped names to avoid conflicts. Update your environment variables accordingly:

MODE=aws
AWS_REGION=us-east-1
S3_BUCKET_RAW=pulseai-raw-data-20251019-123456
S3_BUCKET_PROCESSED=pulseai-processed-data-20251019-123456
DYNAMODB_INSIGHTS_TABLE=PulseAI-Insights
DYNAMODB_ANOMALIES_TABLE=PulseAI-Anomalies
DYNAMODB_CLUSTERS_TABLE=PulseAI-Clusters
AWS_BEDROCK_MODEL_TEXT=amazon.nova-lite-v1
AWS_BEDROCK_MODEL_EMBED=amazon.titan-embed-text-v1

Security Considerations

  1. Never commit AWS credentials to version control
  2. Use IAM roles instead of access keys when possible
  3. Apply the principle of least privilege to all IAM policies
  4. Enable encryption for S3 buckets and DynamoDB tables
  5. Regularly rotate credentials and review permissions

Troubleshooting

If you encounter issues during deployment:

  1. Verify AWS CLI is properly configured with aws sts get-caller-identity
  2. Check that your AWS user/role has the necessary permissions
  3. Ensure all required AWS services are available in your region
  4. Review CloudWatch logs for Lambda function errors
  5. Check the troubleshooting guide for common issues

Cleanup

To remove deployed resources:

# Delete S3 buckets (ensure they're empty first)
aws s3 rb s3://pulseai-raw-data-20251019-123456 --force
aws s3 rb s3://pulseai-processed-data-20251019-123456 --force

# Delete DynamoDB tables
aws dynamodb delete-table --table-name PulseAI-Insights --region us-east-1
aws dynamodb delete-table --table-name PulseAI-Anomalies --region us-east-1
aws dynamodb delete-table --table-name PulseAI-Clusters --region us-east-1