Skip to content

feat: add AWS native implementation#23

Closed
jeastham1993 wants to merge 3 commits into
mainfrom
feat/users-aws
Closed

feat: add AWS native implementation#23
jeastham1993 wants to merge 3 commits into
mainfrom
feat/users-aws

Conversation

@jeastham1993

@jeastham1993 jeastham1993 commented Jun 6, 2025

Copy link
Copy Markdown
Collaborator

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

@jeastham1993

Copy link
Copy Markdown
Collaborator Author

@scottgerring apologies, this is a reasonably chunky PR. Adding the first AWS impl touched quite a few different areas


namespace UserManagementService
{
sealed class Program

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality Violation

Suggested change
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.

View in Datadog  Leave us feedback  Documentation

Assert.Fail("Expected LoginFailedException to be thrown, but it was not.");
}
catch (LoginFailedException ex)
catch (LoginFailedException)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Quality Violation

Catch clause is empty (...read more)

Exceptions must be appropriately handled and have code to recover from the exceptions. If no recovery is added, the code should at least log the error.

View in Datadog  Leave us feedback  Documentation

public InstrumentedFunction(Construct scope, string id, FunctionProps props) : base(scope, id)
{
if (props.Handler.Length > 128)
throw new Exception(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Code Quality Violation

do not throw generic exceptions (...read more)

Exceptions should be specific to the application to help points the exact issue. For these reasons, generic exceptions should not be used and we should instead favor specific exception types.

View in Datadog  Leave us feedback  Documentation

@jeastham1993 jeastham1993 deleted the feat/users-aws branch June 6, 2025 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants