Repository metrics
- Stars
- (0 stars)
- PR merge metrics
- (PR metrics pending)
Description
POC for Basic Implementation of the User Service
Description
Implement a proof-of-concept (POC) for the basic user service that will handle user management operations (e.g., user creation and notifications via email). The service should be containerized and deployed with AWS App Runner, and it must integrate with our existing infrastructure components such as RDS for persistent storage and SQS for asynchronous processing. This POC will help validate the connectivity and overall workflow between the user service and the other infrastructure components defined in our Pulumi configuration.
Tasks
-
Review ECR Repository Configuration
- Confirm that the ECR repository for the user service (
user-service-ecr) is set up correctly. - [Reference:
infrastructure.py#L105]
- Confirm that the ECR repository for the user service (
-
Configure App Runner Service for the User Service
- Set up the App Runner service’s source configuration to use the user service container from the ECR repository.
- Verify that the runtime environment variables (
SERVER_NAME,TRUSTED_HOSTS,DATABASE_URL) are properly configured. - [Reference:
infrastructure.py#L145]
-
Validate IAM Role Setup
- Ensure that IAM roles for App Runner (both for accessing ECR and SQS) are properly set up and attached.
- Check the
apprunner-access-rolefor ECR access andapprunner-instance-rolefor SQS interactions. - [References:
infrastructure.py#L50andinfrastructure.py#L160]
-
Integrate SQS Queues
- Verify that the SQS queues for
send-emailandinsert-user(with their corresponding DLQs) are configured as intended. - Ensure these queues are referenced in the IAM policy for the user service to enable required actions like
SendMessageandSendMessageBatch. - [Reference:
infrastructure.py#L190]
- Verify that the SQS queues for
-
Test Database Connectivity
- Confirm that the
DATABASE_URLenvironment variable is correctly generated and points to the RDS MariaDB instance. - Test connection from the deployed user service to the RDS instance to validate proper CRUD operations on user data.
- [Reference:
infrastructure.py#L140]
- Confirm that the
-
Perform End-to-End Testing
- Deploy a test container of the user service.
- Verify that new user registrations result in messages being correctly sent to the configured SQS queues.
- Validate that these actions trigger the appropriate operations within the database (e.g., user creation).
Acceptance Criteria
- The ECR repository (
user-service-ecr) is confirmed to be accessible and properly configured. - The App Runner service deploys the user service container using the correct image and runtime environment variables.
- IAM roles and policies are validated, ensuring that App Runner has the necessary permissions for ECR access and SQS interactions.
- The SQS queues (
send-emailandinsert-user) and their dead-letter configurations are correctly set up and functioning. - The user service successfully connects to the RDS instance using
DATABASE_URLand performs basic user management operations. - End-to-end testing demonstrates that user actions (e.g., registration) trigger the expected message flows and database operations.