Author: Zeenat Hussain
A comprehensive Spring Boot application demonstrating integration with major AWS services: S3, SNS, SQS, and RDS.
- S3 (Simple Storage Service) - Bucket and object operations (Full functionality)
- SNS (Simple Notification Service) - Topic management and messaging (Full functionality)
- SQS (Simple Queue Service) - Queue operations and message handling (Full functionality)
- RDS (Relational Database Service) - Database instance management (Demo/Mock implementation)
- Spring Boot 2.7.18 - Main framework (Compatible with Java 11)
- AWS SDK for Java 2.21.29 - AWS service integration
- MySQL Connector - Database connectivity (Disabled for demo)
- Maven - Dependency management
- Configure AWS Credentials in
application.properties:
aws.access-key=your-access-key
aws.secret-key=your-secret-key
aws.region=your-region- Run the application:
cd "AWS Services App"
mvn spring-boot:run- Access the application: http://localhost:8082
GET /api/s3/buckets- List all bucketsPOST /api/s3/buckets/{bucketName}- Create bucketDELETE /api/s3/buckets/{bucketName}- Delete bucketGET /api/s3/buckets/{bucketName}/objects- List objectsPOST /api/s3/buckets/{bucketName}/objects/{key}- Upload objectGET /api/s3/buckets/{bucketName}/objects/{key}- Download objectDELETE /api/s3/buckets/{bucketName}/objects/{key}- Delete object
GET /api/sns/topics- List topicsPOST /api/sns/topics/{topicName}- Create topicDELETE /api/sns/topics?topicArn={arn}- Delete topicPOST /api/sns/subscribe- Subscribe to topicDELETE /api/sns/unsubscribe- UnsubscribePOST /api/sns/publish- Publish messageGET /api/sns/subscriptions?topicArn={arn}- List subscriptions
GET /api/sqs/queues- List queuesPOST /api/sqs/queues/{queueName}- Create queueDELETE /api/sqs/queues?queueUrl={url}- Delete queuePOST /api/sqs/send- Send messageGET /api/sqs/receive- Receive messagesDELETE /api/sqs/messages- Delete messagePOST /api/sqs/purge- Purge queueGET /api/sqs/attributes- Get queue attributes
GET /api/rds/instances- List DB instancesPOST /api/rds/instances- Create DB instanceDELETE /api/rds/instances/{id}- Delete DB instanceGET /api/rds/instances/{id}/status- Get instance statusPOST /api/rds/instances/{id}/start- Start instancePOST /api/rds/instances/{id}/stop- Stop instancePOST /api/rds/instances/{id}/reboot- Reboot instancePOST /api/rds/snapshots- Create snapshotGET /api/rds/snapshots- List snapshots
# Create bucket
curl -X POST http://localhost:8082/api/s3/buckets/my-test-bucket
# Upload object
curl -X POST http://localhost:8082/api/s3/buckets/my-test-bucket/objects/test.txt \
-H "Content-Type: text/plain" \
-d "Hello AWS S3!"
# Download object
curl http://localhost:8082/api/s3/buckets/my-test-bucket/objects/test.txt# Create topic
curl -X POST http://localhost:8082/api/sns/topics/my-topic
# Publish message
curl -X POST "http://localhost:8082/api/sns/publish?topicArn=arn:aws:sns:us-east-1:123456789012:my-topic&message=Hello&subject=Test"# Create queue
curl -X POST http://localhost:8082/api/sqs/queues/my-queue
# Send message
curl -X POST "http://localhost:8082/api/sqs/send?queueUrl=https://sqs.us-east-1.amazonaws.com/123456789012/my-queue" \
-H "Content-Type: text/plain" \
-d "Hello SQS!"RDS operations return placeholder messages instead of creating actual AWS resources. This is intentional because:
- RDS operations are complex and require specific AWS permissions
- Creating real RDS instances costs money ($15-50+ per month)
- RDS instance creation takes 10-20 minutes
- The demo implementation shows API structure without AWS charges
Expected RDS Response: "RDS operations require proper AWS configuration and permissions. Instance ID: [your-id]"
- S3, SNS, SQS: Full AWS integration with real operations
- RDS: Mock implementation for demo purposes
- Database: Disabled to avoid MySQL connection requirements
- Never commit AWS credentials to version control
- Use IAM roles when running on EC2
- Follow AWS security best practices
- Implement proper error handling for production use
- Default port: 8082
- AWS region: us-east-1 (configurable)
- Supports both credential-based and IAM role authentication
- Database auto-configuration disabled for demo purposes