How suhaybu/bustleit-backend-aws works
• AWS Resources – Start by representing the AWS resources defined in template.yaml. These include:
• API Gateway (exposing HTTP endpoints)
• Two AWS Lambda functions:
• userprofile-lambda (handles routes for profile management, authentication, and recommendations)
• usertasks-lambda (handles routes for scheduling and task management)
• Shared Code and Services – Represent the shared utilities in the src/common directory that provide:
• Database configuration (DB connection pools, config files)
• Common error handling and shared models (for users, schedules, tasks, profiles, etc.)
• Shared services like CORS and authentication middleware
• Data Sources – Include:
• A relational database indicated by the SQL migration files (in the migrations directory)
• Test event files (under events and events/test-events) which are used to simulate invocation data for local testing
Relationships and Data Flow
• Additionally, show a connection from the common code (or directly from each Lambda if preferred) to the Database component. This indicates that the functions perform data storage and retrieval operations using the defined SQL migrations and connection pools.
• Optionally, indicate CI/CD integrations (like the GitHub Actions workflow in .github/workflows/rust.yml) that automate builds and tests.
Architectural Patterns and Technologies
• Modularity of the project:
• The separation of Lambda function code (specific domains like user profiles vs. user tasks)
• The common library (src/common) that centralizes shared functionality (consistent with DRY principles)
• That the project leverages AWS SAM for both defining and deploying the infrastructure, and the deployment process is clearly guided in the README.
• Mention the use of Rust for the Lambda functions, indicating performance and safety considerations, and the use of cargo-lambda for cross-compilation.
• Database migration files as part of the deployment cycle that ensures the database schema is correctly maintained.