16
Jun

Serverless Architecture: Zappa

Maintaining the backends or servers is always a part of the headache for the programer. And here walk in the solution, serverless Architectures.

What are Serverless architectures?

It refer to applications that significantly depend on third-party services (known as Backend as a Service or “BaaS”) or on custom code that’s run in ephemeral containers (Function as a Service or “FaaS”), the best known vendor host of which currently is AWS Lambda

Using an amazing library called Zappa, it is now easy to deploy in AWS Lambda.

What is Zappa?

Zappa is a system for running “serverless” Python web applications using AWS Lambda and AWS API Gateway. It handles all of the configuration and deployment automatically . Now it is easy to deploy an infinitely scalable application to the cloud with a just single command at the least possible cost often just a small fraction of the cost of a traditional web server.

Installation:

You can install zappa easily using

To install AWS command tools,

Let’s get started

So before we start using Zappa, let’s create a simple hello world website using flask and run it on our locla server

At a directory of your choice, save the following program as Prg.py

And run it on your local server using the following commands at your cmd

Now check out http://127.0.0.1.5000/. You can see a simple webpage like below.

Before we get our hands on some zappa, we need to ensure we have a valid AWS account.

You can create a AWS account by following the steps one by one here.

After creating an account, run the following command to configure your AWS account in your command line and and fill in the access key id, the secret access key and the default region..

Let’s configure Zappa now.

Run the follwing command in your project directory

This creates a file named zappa_settings.json inside our project directory with the following content.

Now deploy zappa using

And it’s done!!Thtat’s all it takes.!Just a single command!

Benefits of Zappa:

  • No more tedious web server configuration!
  • No more paying for 24/7 server uptime!
  • No more worrying about load balancing / scalability!
  • No more worrying about web server security!
  • Scalability since we can have as many responses processed in parallel as we need. Since AWS Lambda handles all of the requests
  • 100 function executions per second,and if you scale beyond that you only need to ask Amazon to raise your limit.
  • Inexpensive since we pay by the millisecond.. Not to mention the cost saving on not having to spend time on deployment, operations and maintenance!
  • Maintainability and Ease of Use
  • Easy to deploy.- deployed in a single command

Challenges of Zappa

  • Integration with the other services of the cloud platform is often said to raise an issue.

To learn more of zappa, which I am sure you would want to, check out these sites:

16
Jun

Free Tensorflow eBooks

Tensorflow considered one of most used Machine Learning library offered by Google. It is fast, flexible and easy for beginners as well as professionals. Below is the list of free Tensorflow ebooks with their download link curated from different sources. Hope, you will find them useful in preparing for Tensorflow.

  • Building Machine Learning Projects with TensorFlow [Download]
  • Deep Learning with TensorFlow [Download]
  • Getting Started with TensorFlow [Download]
  • Hands-On Deep Learning with TensorFlow [Download]
  • Hands-On Machine Learning with Scikit-Learn and TensorFlow [Download]
  • Learning TensorFlow A Guide to Building Deep Learning Systems [Download]
  • TensorFlow 1.x Deep Learning Cookbook [Download]
  • TensorFlow for Deep Learning From Linear Regression to Reinforcement Learning [Download]
  • TensorFlow For Machine Intelligence [Download]
  • TensorFlow Machine Learning Cookbook [Download]

If you would like to list your ebook free of cost or would like to contribute, do comment or reach out to us.