# Configure aurora within serverless.yml

**URL:** <https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [November 26, 2018, 1:44pm UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568 "2018-11-26T13:44:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![harshityadav](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/harshityadav/32/2781_2.png) [@harshityadav](https://forum.serverless.com/u/harshityadav)\
**Post date:** [November 26, 2018, 1:44pm UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/1 "2018-11-26T13:44:31Z")

</div>

I am just started with AWS aurora. Can anyone help me with the configuration part?  
Is it feasible to use Server less with aurora in terms of performance?

---

<div class="post-metadata">

**Author:** ![harshityadav](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/harshityadav/32/2781_2.png) [@harshityadav](https://forum.serverless.com/u/harshityadav)\
**Post date:** [November 26, 2018, 2:06pm UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/2 "2018-11-26T14:06:25Z")

</div>

Any help would be very much appreciated.

---

<div class="post-metadata">

**Author:** ![kvarela](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kvarela/32/2288_2.png) [@kvarela](https://forum.serverless.com/u/kvarela)\
**Post date:** [November 29, 2018, 12:58am UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/3 "2018-11-29T00:58:38Z")

</div>

I don’t know if there’s any way yet to configure Aurora from within the Serverless framework, but I’ve been using Aurora with my Serverless functions and it’s been performing well. fyi, I’m using TypeORM as well to manage it.

---

<div class="post-metadata">

**Author:** ![harshityadav](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/harshityadav/32/2781_2.png) [@harshityadav](https://forum.serverless.com/u/harshityadav)\
**Post date:** [November 29, 2018, 8:10am UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/4 "2018-11-29T08:10:30Z")

</div>

@kvarela

I really appreciate this reply. I was waiting for this from last 2 days.  
Can you please confirm the engine you are using in Aurora ?  
I want to use PostgreSQL. Is it possible for you to provide some code example for the same.

---

<div class="post-metadata">

**Author:** ![kvarela](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kvarela/32/2288_2.png) [@kvarela](https://forum.serverless.com/u/kvarela)\
**Post date:** [November 29, 2018, 7:07pm UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/5 "2018-11-29T19:07:33Z")

</div>

I’m using Postgres 10.4. I wrote a blog post on how to wire up TypeORM with Postgres and Serverless. It might be a bit out dated now, but let me know if you have any questions:  
[https://medium.com/roam-engineering/wiring-up-typeorm-with-serverless-5cc29a18824f](https://medium.com/roam-engineering/wiring-up-typeorm-with-serverless-5cc29a18824f)

---

<div class="post-metadata">

**Author:** ![harshityadav](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/harshityadav/32/2781_2.png) [@harshityadav](https://forum.serverless.com/u/harshityadav)\
**Post date:** [November 30, 2018, 4:33am UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/6 "2018-11-30T04:33:25Z")

</div>

Thank you @kvarela  
This is really helpful , i will update here if i face any problem.

---

<div class="post-metadata">

**Author:** ![harshityadav](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/harshityadav/32/2781_2.png) [@harshityadav](https://forum.serverless.com/u/harshityadav)\
**Post date:** [December 4, 2018, 9:40am UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/7 "2018-12-04T09:40:36Z")

</div>

Hi @kvarela  
I am facing an issue in serverless webpack. Everything is working fine on my deployment. But after deployment it is throwing error that

" **Postgres package has not been found installed. Try to install it: npm install pg --save"**

And this is my webpack config

const path = require(‘path’);  
const slsw = require(‘serverless-webpack’);

module.exports = {  
 entry: slsw.lib.entries,  
 resolve: {  
 extensions: [  
 ‘.js’,  
 ‘.jsx’,  
 ‘.json’,  
 ‘.ts’,  
 ‘.tsx’  
 ]  
 },  
 output: {  
 libraryTarget: ‘commonjs’,  
 path: path.join(\_\_dirname, ‘.webpack’),  
 filename: ‘[name].js’,  
 },  
 externals: [  
 ‘aws-sdk’,  
 ‘pg’  
 ],  
 target: ‘node’,  
 module: {  
 loaders: [  
 {test: /.ts(x?)$/, loader: ‘ts-loader’},  
 ],  
 },  
};

_Do you have any idea about this. I think this is related to the webpack externals ._

---

<div class="post-metadata">

**Author:** ![kvarela](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/kvarela/32/2288_2.png) [@kvarela](https://forum.serverless.com/u/kvarela)\
**Post date:** [December 4, 2018, 10:59pm UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/8 "2018-12-04T22:59:22Z")

</div>

Sorry Harshit, I’m not familiar with Webpack.

---

<div class="post-metadata">

**Author:** ![harshityadav](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/harshityadav/32/2781_2.png) [@harshityadav](https://forum.serverless.com/u/harshityadav)\
**Post date:** [December 5, 2018, 2:42pm UTC](https://forum.serverless.com/t/configure-aurora-within-serverless-yml/6568/9 "2018-12-05T14:42:32Z")

</div>

@ kvarela

No problem. I found the solution of this Issue. We need to forcefully include pg module. I am using serverless-webpack.

# enable auto-packing of external modules  
webpackIncludeModules:  
 forceInclude:  
 - pg

these lines need to added in the serverless.yml
