Deploying a basic application on GCP, AWS and Azure
MIT License
Deploying a basic application on Google Cloud, AWS and Azure using docker
This is a completely fictional project that I made called "pdf2image-as-a-service" what it does is convert a pdf sent through HTTP into jpegs with a small flask web app.
The interesting piece is not how such thing works, but how it can be deployed on the three most significant cloud providers, namely Google, Amazon and Microsoft.
The project contains two projects as-a-service
and as-a-function
. The first one is about deploying the above as a container, while the second is about deploying as a function.
Here's what each file in as-a-service
does:
app/app.py
: The applicationmicrosoft/azure.sh
: Deploy to Azuregoogle/google_cloud.sh
: Deploy to Google Cloudamazon/aws.sh
: Deploy to AWS (Coming soon!)Now for as-a-function
:
build_poppler.sh
: Script to build poppler executable used by pdf2imagemicrosoft/function.sh
: Deploy as a function to azuregoogle/app_engine.sh
: Deploy as a function to GCPamazon/lambda.sh
: Deploy as a function on AWSAt the current time, only AWS Lambda and Google App Engine work. You can run it with these steps:
cd as-a-function
bash -c amazon/lambda.sh
OR bash -c google/app_engine.sh
The output.json
is a dictionary containing the resulting images as base64.
sudo usermod -aG docker $USER
Disclaimer: My experience with these services is shallow and the opinions you can read here are not to be taken as absolute.
As of 2018, and after deploying on Google Cloud, Microsoft Azure, Amazon AWS: