# Best way to provision/populate resources for continuous deployment?

**URL:** <https://forum.serverless.com/t/best-way-to-provision-populate-resources-for-continuous-deployment/3591>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [January 24, 2018, 5:09pm UTC](https://forum.serverless.com/t/best-way-to-provision-populate-resources-for-continuous-deployment/3591 "2018-01-24T17:09:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akravetz](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@akravetz](https://forum.serverless.com/u/akravetz)\
**Post date:** [January 24, 2018, 5:09pm UTC](https://forum.serverless.com/t/best-way-to-provision-populate-resources-for-continuous-deployment/3591/1 "2018-01-24T17:09:28Z")

</div>

Hi all,  
My problem is this: I have a lambda service that relies on a prepopulated databse (DynamoDB, for sake of argument). The first time it’s deployed to a given stage (dev, test, prod), it needs to create and populate this database. Every time there after it just needs to use the database. The problem is if I put the DB in the resources section of my serverless.yaml, CloudFormation will overwrite it every time, right?

What is the best way to structure this in my project?

Currently: I’ve have two separate projects: “project” and “project-deploy”. project-deploy contains all the cloudformation stuff, populates the DB, and is ideally only run once or during infrastructure changes (via a lambda function ‘initialize’). project then does not have a resource section at all and is run under the assumption that everything is already created.

Is this a reasonable approach?

Thanks,  
Alex
