Reputation: 1076
I'm working with CDK and working to set up CI/CD. My stack looks like so:
L2: AppStack: 2 ECS Services
L1: StorageStack: RDS Database
L0: SharedInfrastructure: Networks
How to set up CI is not exactly clear. For example, because I'm using Prisma, I'm unsure if migrations should happen in AppStack or StorageStack. Additionally, how should I do these migrations? Does it make sense to set up a Serverless function that is then hit on a change is detected? But then this function needs to be updated every time the Prisma schema is updated. What happens if there is a potential data loss?
I could be missing something generally but hoping someone might give me some insight. Thanks!
Upvotes: 0
Views: 405
Reputation: 198
I don' think it should go in any of your stacks. Depending on what are you using to implement your CI this could go in a separate CI Stack (in case you are using AWS DevOps Stack) or inside something lake github actions or bitbucket pipelines.
A simple flow would be:
Upvotes: 1