# Best local development workflow for the tutorial

**URL:** <https://discourse.sst.dev/t/best-local-development-workflow-for-the-tutorial/731>\
**Category:** General\
**Created:** [January 6, 2019, 11:45pm UTC](https://discourse.sst.dev/t/best-local-development-workflow-for-the-tutorial/731 "2019-01-06T23:45:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayco](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayco/32/376_2.png) [@jayco](https://discourse.sst.dev/u/jayco)\
**Post date:** [January 6, 2019, 11:45pm UTC](https://discourse.sst.dev/t/best-local-development-workflow-for-the-tutorial/731/1 "2019-01-06T23:45:37Z")

</div>

Hey guys - I have just completed the tutorial and love it!

What is the best local development workflow for the tutorial. It is important for me to be able to set up a local development environment that can be used offline. Has anyone setup an environment with the services used in the AWS tutorial:

- Cognito
- S3
- API
- Dynamo

I am guessing mocking out urls or event.requestContext.identity and possibly running localstack.

Any help would be greatly appreciated 🙂

---

<div class="post-metadata">

**Author:** ![jayco](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayco/32/376_2.png) [@jayco](https://discourse.sst.dev/u/jayco)\
**Post date:** [January 7, 2019, 9:53pm UTC](https://discourse.sst.dev/t/best-local-development-workflow-for-the-tutorial/731/2 "2019-01-07T21:53:45Z")

</div>

Ok to answer my own question and for anyone that stumbles upon this looking for a quick setup, so you can run and debug the functions locally - this works:

- Set headers in client for cognito eg… `cognito-identity-id: USER-SUB-1234`
- Run dynamo db locally either using localstack or [https://github.com/99xt/serverless-dynamodb-local/tree/v1](https://github.com/99xt/serverless-dynamodb-local/tree/v1)  
Note:
  - There is an issue with this you will need to pin the install [https://github.com/serverless/serverless/issues/3247](https://github.com/serverless/serverless/issues/3247) see the last comment for the stackoverflow fix (that worked for me)
  - You need to set migration to true in the serverless.yml, even if you dont seed or it will not generate the table

I just used the data out of the mocks to post and retrieve notes - worked pretty easy.

There is also an example on `https://github.com/serverless/examples/tree/master/aws-node-rest-api-with-dynamodb-and-offline` (new members can only post 2 links) ☹

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [January 9, 2019, 12:33am UTC](https://discourse.sst.dev/t/best-local-development-workflow-for-the-tutorial/731/3 "2019-01-09T00:33:29Z")

</div>

Awesome! Thank you for sharing. We should turn this into a chapter for other folks!
