feat: add AWS native implementation#23
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an AWS native implementation for handling user-management events via Lambda functions while removing the previous DynamoDB‑based authentication components. Key changes include:
- New AWS Lambda function implementations (SQS, Kafka, Outbox, and migration functions) for processing events.
- Removal of legacy DynamoDB-based authentication and identity code.
- Addition of AWS (and some Azure‑referenced) service adapters and infrastructure files.
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Stickerlandia.UserManagement.Lambda/Sqs.cs | New Lambda functions for processing SQS events and outbox work. |
| Stickerlandia.UserManagement.Lambda/OutboxFunctions.cs | Duplicate Lambda functions similar to Sqs.cs – consider consolidating. |
| Stickerlandia.UserManagement.Lambda/MigrationFunction.cs | New migration function implementation with potential logger type mismatch. |
| Stickerlandia.UserManagement.Lambda/Kafka.cs | AWS Lambda function for Kafka event handling. |
| Stickerlandia.UserManagement.AWS/* | New AWS native (and some Azure‑referenced) service and configuration files. |
| Stickerlandia.UserManagement.Auth/* | Removal of DynamoDB‑specific authentication and identity code. |
| infra/aws/* | New AWS infrastructure related files. |
Comments suppressed due to low confidence (3)
user-management/src/Stickerlandia.UserManagement.Lambda/Sqs.cs:17
- [nitpick] There appears to be duplicate Lambda function implementations in Sqs.cs and OutboxFunctions.cs; consider consolidating these to improve maintainability and reduce redundancy.
public class Functions(ILogger<Functions> logger, IServiceScopeFactory serviceScopeFactory, OutboxProcessor outboxProcessor)
user-management/src/Stickerlandia.UserManagement.Lambda/MigrationFunction.cs:8
- The logger generic parameter is currently ILogger; consider updating it to ILogger to accurately reflect the class name.
public class OutboxFunctions(ILogger<Sqs> logger, IServiceScopeFactory serviceScopeFactory, OutboxProcessor outboxProcessor)
user-management/src/Stickerlandia.UserManagement.AWS/ServiceExtensions.cs:21
- The namespace in this file is 'Stickerlandia.UserManagement.Azure', which does not match its AWS folder location; consider updating the namespace for clarity and consistency.
namespace Stickerlandia.UserManagement.Azure;
|
@scottgerring apologies, this is a reasonably chunky PR. Adding the first AWS impl touched quite a few different areas |
|
|
||
| namespace UserManagementService | ||
| { | ||
| sealed class Program |
There was a problem hiding this comment.
⚪ Code Quality Violation
| sealed class Program | |
| sealed static class Program |
class could be made static (...read more)
This rule states that a class should be declared as static if it only contains static members. Declaring a class as static indicates that it cannot be instantiated or extended and that all its members are static. This provides a clear signal to other developers that this class is not meant to be used as an object.
What the rule detects
The rule detects if all members are static . If they are, the rule recommends to declare the class static.
How to fix the issue?
Declare the class static by adding the static keyword to its declaration.
| Assert.Fail("Expected LoginFailedException to be thrown, but it was not."); | ||
| } | ||
| catch (LoginFailedException ex) | ||
| catch (LoginFailedException) |
| public InstrumentedFunction(Construct scope, string id, FunctionProps props) : base(scope, id) | ||
| { | ||
| if (props.Handler.Length > 128) | ||
| throw new Exception( |
There was a problem hiding this comment.
Add first implementation of AWS native services, including SNS for publishing, Lambda for consuming from queues and also a basic deployment with the AWS CDK to run the API and workers on Lambda.