awslabs / sbt-aws

SaaS Builder Toolkit for AWS is a developer toolkit to implement SaaS best practices and increase developer velocity.
Apache License 2.0
130 stars 26 forks source link

refactor: Purpose-specific constructs #64

Closed tobuck-aws closed 3 months ago

tobuck-aws commented 3 months ago

Reason for this change

This PR moves services into their own constructs, and splits apart the ControlPlaneApi construct that was getting huge.

Description of changes

The API construct is now just the HTTP API. Each service gets passed the API and the authorizer, and add their own routes to the API.

Each service is also encapsulated (where appropriate) along with its datastore. TenantManagementService, for instance, now includes and creates a TenantManagementTable construct.

Ensured that current tests run and mitigated all CDK Nags.

Checklist


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.