How do I connect from Azure Data Factory to an AWS-hosted Postgres database? - postgresql

I have a Postgres database created on Heroku but looks like it's spun up on AWS based on the server name. Unfortunately, I can't tell if it's an Aurora or RDS instance.
I'm trying to create some data pipelines on Azure Data Factory to do some ETL work moving Blob files onto the Postgres Database but am having a tough time setting it up. The default Postgres option isn't working - looks like DataFactory tries to make a JDBC connection.
I'm stuck and am clueless as to how I should set up the connection.

Related

Scheduling AWS RDS snapshot migrations

I am trying to set up a process in which a postgres staging database is populated with production data.
I have some working implementation with pg_dump and pg_restore but I was wondering if something in RDS itself is possible.
We have nightly snapshots on our production database. My goal would be RDS takes the latest database snapshot, migrates it to an existing database and does this on some scheduled cadence (1/week or something like that).
Is this possible to configure in the console? If not are there some some combination of lambda/cloud formation that can do this?
My goal would be RDS takes the latest database snapshot, migrates it to an existing database
RDS never loads a snapshot into an existing database. It always creates an entirely new database server/cluster from a snapshot.
Is this possible to configure in the console? If not are there some some combination of lambda/cloud formation that can do this?
You would have to write some code that creates a new staging database server from the production snapshot, and deletes your current server.
If you are using CloudFormation, then it could manage this for you if you specify the DBSnapshotIdentifier parameter. You would have to modify that parameter each week, and then update your CloudFormation stack.

Refresh postgres materialized view using scheduler

I was trying to figure-out how we can schedule to refresh the materialized view on azure postgres database single server which is in azure cloud, one solution is to use pg_cron extension, but it
seems it is only available on azure flexible postgres database server and not on azure postgres database single server, I did not get any other option available, any suggestion in this regard will be really helpful.
I did not find any postgres scheduler extension for the db hosted on Azure, so created one microservice to schedule the db functions.
Example Link

What is the most recommend way to transfer data from a postgresl db to another postgresdb in aws

We have a production postgresql db available only in glue catalog. What's the best practices to ETL some tables in this database and load the data into another postgresql instance in the same aws account?
This production database is our transactional db and we don't need most of it's tables. We already have some glue ETL's creating tables in S3 (so accessible via Athena) but the goal here is to load into another postgresql instance.
Thanks

PostgreSQL data migration from one database to other database in AWS

I have my Old postgres database which is not a cloud based. And I want to migrate the data from the old database to new database which is in aws.
So can this be done via dblink or what is the other best practises to do this.
You can migrate DBs to AWS via AWS Database Migration Service. It's fully managed tool to help you move your data from on premises to AWS. You can read more about it here: https://aws.amazon.com/dms/?nc=sn&loc=1.

AWS RDS vs local database in EC2 instance

I want to understand AWS Relational Database Service (RDS) and discover benefits from using it.
Why RDS is better than manually installed PostgreSQL database in EC2 instance?
Is it possible to connent existing database in EC2 instance with Amazon RDS?
How it really works?
How I should automation RDS?
When I want create new database in existing EC2 instance I can use Ansible in simply way. How I should connect my application with database which uses RDS ?
Thanks in advance!
I want to understand AWS Relational Database Service (RDS) and discover benefits from using it.
As already commented, read the docs and whitepapers.
Why RDS is better than manually installed PostgreSQL database in EC2 instance?
you can be sure it is well setup, you will get point in time recovery, backups and high availability. As well you can set it up yourself, however using RDS you have it all already configured.
Ifs it possible to connent existing database in EC2 instance with Amazon RDS? How it really works?
you don't have access to any underlying configuration, so nope, you cannot really connect ec2 database w/ rds (e. g. wal for wal streaming).
you still can use database migration tools to migrate all databases and updates to or from rds
How I should automation RDS? When I want create new database in existing EC2 instance I can use Ansible in simply way.
you can use a cloudformation template or cli commands
How I should connect my application with database which uses RDS ?
when you create a rds instance, you will define an admin user and receive a connection url
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Scenarios.html#USER_VPC.Scenario1