AWS Chalice

Explore a more rapid way of building serverless Python applications using AWS Chalice microframework.

For many developers, serverless computing is still an unexplored field, and the idea of transitioning from traditional servers to serverless may look like an enormous challenge.

A lot of people have come up with some advantageous, effective, and useful tools and resources to facilitate this transition, be it an article or a framework. Such a tool is a Python microframework, built by AWS engineers, named Chalice.

Quintagroup is also among those who are able to help. Check out our latest case studies of Xchange.Loans - an active sales marketplace built using AWS Chalice. You can also find a detailed description of what is serverless computing in our blog article - Serverless - the next step in cloud computing

What is AWS Chalice?

AWS Chalice is a microframework for the development and fast deployment of serverless applications built with AWS Lambda functions in Python. Chalice also offers the functionality of integrating other Amazon services, including the Amazon API Gateway, Amazon Simple Storage Service (S3), and Simple Queue Service (SQS).

Chalice not only allows you to build Python applications but also to deploy them easily by offering a command-line interface for developing, maintaining, and deploying your software.

Chalice. Upgrade the way you build serverless Python applications.

At first glance, Chalice may look like not an extensive framework regarding its feature set, but it actually contains significant functionalities for most applications. For most developers, the feature set of AWS Chalice would be sufficient, but if anyone needs more features, other more complex frameworks are available.

To sum up, AWS Chalice microframework is used for:

  • Creating, deploying, and managing your application with the help of a command line tool
  • Integrating with Amazon API Gateway, Amazon S3, Amazon SNS, Amazon SQS, and other AWS services
  • Generating Automatic IAM policy

How to use AWS Chalice?

Here are a few examples of applying AWS Chalice. The framework provides plenty of more capabilities to give you control over your code. You may experience AWS Chalice software to the full via the official documentation or a GitHub repository.

AWS Chalice and AWS Lambda

You probably know what AWS Lambda is if you take an interest in a serverless technology. If you don't know, AWS Lambda is a serverless framework offered by Amazon Web Services where you can build and execute 'Lambda functions', which you can operate without getting any instances on the cloud (such as EC2).  These functions can then be initiated using a variety of triggers such as S3 events, CloudWatch rules, and API Gateways.

AWS Chalice and AWS Lambda

AWS Lambda allows programming languages including Java, Go, PowerShell, Node.js, C#, Python, and Ruby. When you compose the Python Lambda function you can use Chalice to make life a little simpler. You can write a Lambda function using Chalice, test it locally, and even deploy the Lambda function in your development, test, or production environments. Note, that AWS Chalice supports all AWS Lambda-supported versions of Python which is Python 2.7 and Python 3.6 for now. Chalice will automatically select which version of Python to use for your Lambda-based application according to the major Python version you use. You will not need to customize directly which version of Python you choose to use.

Continuous Deployment with AWS Chalice

A simple Continuous Deployment pipeline can be organized using Chalice. The 'chalice deploy' command is useful for easily getting up and running for Chalice, but it can get complex in a team setting that properly handles permissions, shares, and changes the deployed.json script.

One approach to scaling up the Chalice application is to build a system for continuous deployment. The pipeline will run checks on modifications in code and move the latest construct to a checkpoint if they pass. More checks can be placed in effect to manually facilitate a project to completion or you can set up an automatic process. This paradigm significantly simplifies the handling of  Chalice tools as they are all stored in the Continuous Deployment pipeline.

Chalice will create a template for CloudFormation which will build a pipeline for the start of Continuous Delivery. This includes a repository of CodeCommit, a CodeBuild stage for assembling the AWS Chalice software, and a CodePipeline stage for using CloudFormation to deploy the code.

Why AWS Chalice?

Fist of all, Chalice will be of great convenience in terms of creating and delivering the first application for Python developers that are accustomed to the Flask Python framework. Highly influenced by Flask as far as code structure is concerned, Chalice leaves things very streamlined in describing what the software will look like and rendering it as an executable package of the same.

Secondly, it also enables serverless software to be created and implemented on Python. Other technologies can only help you build serverless software in JavaScript.

Lastly, contacting Quintagroup, you will not only receive a robust software product based on trending technologies like AWS Chalice, but also a peace of mind and a trusted software partner.

Connect with our experts Let's talk