I've created a web application using the Meteor web framework, GeoServer and PostGIS. I've deployed my app on Amazon Web Services with the Meteor app and GeoServer running as 2 separate tasks on 1 EC2 instance using ECS, and my PostGIS database being hosted by Amazon RDS. I've run into an issue where I've added a feature allowing users to download a Shapefile of their data by calling pgsql2shp in my server code, but this only works locally for me as I have PostGIS, GeoServer and my app all running on my machine. In the deployed version of my app the download feature is causing my app to crash as I don't have PostGIS installed on the container running my server code, it's installed on the Amazon RDS instance.
Does anyone know how I can export a Shapefile from Amazon RDS using pgsql2shp, when the utility isn't installed on the server machine that is executing the export command? Is there a web API that can be called instead?