Expert guidance for AWS CDK-based text-to-speech microservice with Java 21, Maven, and Lambda orchestration. Handles infrastructure, builds, and deployment.
This skill provides expert guidance for working with a microservice-based text-to-speech (TTS) system built with AWS CDK, Java 21, and Maven. The system processes document uploads through Lambda functions orchestrated by S3 events, transforming text files into audio output.
The system consists of two main CDK stacks:
**FileFlowStack:**
**ApiStack:**
**Lambda Flow:**
1. File uploaded via API Gateway → ValidationLambda
2. File stored in OriginalFileBucket → triggers TransformLambda
3. Chunks stored in ChunkFileBucket → triggers TTSLambda
4. Audio files stored in ProcessedFileBucket
When working with this codebase, follow these guidelines:
- file-validation-lambda: Handles file uploads, validates PDF/TXT files
- file-transform-lambda: Downloads and chunks files (incomplete implementation)
- file-tts-lambda: TTS conversion (placeholder)
- notification-lambda: Exists but not wired in stacks
For building the entire project:
```bash
mvn package
```
For building a specific Lambda function:
```bash
mvn -f lambdas/file-validation-lambda/pom.xml package
```
For running tests:
```bash
mvn test
```
For testing a specific module:
```bash
mvn -f cdk/pom.xml test
```
List all stacks:
```bash
cdk ls
```
Synthesize CloudFormation templates:
```bash
cdk synth
```
Deploy all stacks:
```bash
cdk deploy --all
```
Show differences from deployed stacks:
```bash
cdk diff
```
When modifying code, be aware of completion status:
**Adding a new Lambda function:**
1. Create new module under `lambdas/`
2. Add module reference in root pom.xml
3. Implement Lambda handler
4. Wire into appropriate stack (FileFlowStack or ApiStack)
5. Configure S3 triggers or API routes as needed
**Modifying S3 buckets:**
1. Update bucket definitions in FileFlowStack
2. Ensure IAM permissions are updated for Lambda functions
3. Verify S3 event notifications are configured correctly
4. Test the entire pipeline after changes
**Updating API endpoints:**
1. Modify ApiStack to add/update routes
2. Ensure proper Lambda integration
3. Update IAM roles if needed
4. Verify CloudWatch logging configuration
When asked to add a new feature:
1. Identify which Lambda function(s) need modification
2. Determine if CDK stacks need updates
3. Build and test locally using Maven commands
4. Use `cdk diff` to preview infrastructure changes
5. Deploy with `cdk deploy --all`
When debugging issues:
1. Check CloudWatch logs for the relevant Lambda function
2. Verify S3 event triggers are firing correctly
3. Confirm IAM permissions are sufficient
4. Test individual Lambda functions in isolation when possible
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aws-tts-microservice-assistant/raw