Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

robj's avatar
Level 9

Vapor - connecting to multiple AWS DB servers

Hi all - I have an Laravel 10 app deployed in Vapor. Vapor also has our staging and UAT environments. Production has its own DB server and staging & UAT are on a different DB server. Both the DB servers have been provisioned by Vapor.

To keep UAT fresh we plan to anonymize Production data and copy it over. For this we use two DB connections in the application. ie we don't save a dump and copy it over.

It all works well if the source and target database are on the same server, however, when we try to copy the data to a different target server the connection times out.

  • Everything (I think) is on the same network, though one server is private (does that make a difference?)
  • I can deploy and use the target server
  • I can run the copy process from my local machine to a target server on AWS

Any thoughts?

Thanks, RobJ.

0 likes
2 replies
martinbean's avatar

@robj Production data shouldn’t leave production environments. Use factories and seeds to create data in non-production environments.

It just takes one person to momentarily forget they’re not in UAT to mess up live data. And it does happen.

robj's avatar
Level 9

@martinbean I don't know, sounds like a sweeping statement, there's lots of reasons why prod data is taken off prod envs; back up, MI, resiliance, compliance, etc.

I've worked in mulitple regulated industries where data is taken off prod envs, it needs proper controls for sure. If people can mistakenly do something in prod it's not just data at risk.

Please or to participate in this conversation.