SAP CAP – How to deploy on a remote PostgreSQL DB (AWS)?

Hello Experts,

I would like to deploy a CAP App (node.js) to an AWS PostgreSQL instance. I created a simple CAP App containing the bookshop sample and added the @cap-js/postgres plugin. It works fine when I deploy it to the BTP “Postgres, Hyperscaler Option”. Now, I want to go one step further and deploy it to my remote PostgreSQL hosted by AWS. Connecting to the PostgreSQL via pgAdmin is possible. I added the following configuration to the package.json:

 

 

 

 

“cds”: {
“requires”: {
“auth”: {
“kind”: “basic”,
“users”: {
“admin”: {
“password”: “admin”
}
}
},
“db”: {
“kind”: “postgres”,
“credentials”: {
“host”: “jdbc:postgresql://<db host>”,
“port”: <port>,
“user”: “<user>”,
“password”: “<password>”,
“database”: “postgres”
},
“dialect”: “postgres”,
“impl”: “@cap-js/postgres”
}
}
}

 

 

 

 

While deploying the app I am receiving this error:

image.png

Is the configuration correct, or are there further steps I need to take?

 

Thank you!

Christopher

Scroll to Top