![Building Serverless Python Web Services with Zappa](https://wfqqreader-1252317822.image.myqcloud.com/cover/614/36699614/b_36699614.jpg)
Installing and configuring Zappa
Installing Zappa is a straightforward task, but before we move ahead, we need to configure the prerequisites. Make sure you have Python 2.7 or Python 3.6 and have a valid AWS account. Now, you need to configure the AWS credentials on your machine with help awscli:
$ pip install awscli
Configure the AWS credentials using the aws configure command, as shown in the following screenshot:
![](https://epubservercos.yuewen.com/CACC6B/19470390501551006/epubprivate/OEBPS/Images/89e08725-eb94-41be-ae8f-7ae5b8a7749e.png?sign=1738786050-z7AXMbdIrTiboMlL1KqCFOin6hhoKIGB-0-b1961e1082e0c112497c22cda327282c)
The configuration for AWS credentials requires that you have an AWS Access Key ID, AWS Secret Access Key, Default region name, and a Default output format.
You can get AWS credential information from your My Security Credentials page, as shown in the following screenshot:
![](https://epubservercos.yuewen.com/CACC6B/19470390501551006/epubprivate/OEBPS/Images/dd473391-368e-4b24-896c-34809627d2aa.png?sign=1738786050-qD86mQ3tR5tTpA1DOSNOAmmAawk4QXqK-0-bb6c6e8c5900de9f4fc3ae63cd986d2e)
Once you've configured your AWS credentials, we can move ahead with Zappa's installation.
Zappa must be installed in a virtual environment. It's strongly recommended that you create a virtual environment and activate it before installing Zappa. I prefer to use the virtualenv tool. There are other tools available to manage your virtual environments:
$ virtualenv env -p python3.6
Here, we are creating a virtual environment named env and using python3.6, where -p indicates the Python version. Now, activate the virtual environment as follows:
$ source env/source/bin
We are set to go now, so let's install Zappa using pip:
$ pip install zappa
Now, we are ready to launch Zappa. In the following sections, we will be creating a small program to demonstrate how we can make Zappa's deployment serverless.