Building in AWS

The best way to learn python (or any language) is to build something. In this chapter we are going to look at ways to extend your knowledge and usage of both python and AWS services. It will contain some links to other workshops and projects.

Building Lambda Functions with Python

AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume.

With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.

You can run Python code in AWS Lambda. Lambda provides runtimes for Python that execute your code to process events. Your code runs in an environment that includes the SDK for Python (Boto 3), with credentials from an AWS Identity and Access Management (IAM) role that you manage.

Learn how to build a Lambda function using python

Build a Modern Web Application in Python

In this tutorial, you’ll build your first modern application on AWS. Modern applications isolate business logic, optimize reuse and iteration, and remove overhead everywhere possible. Modern apps are built using services that enable you to focus on writing code while automating infrastructure maintenance tasks.

Cloud Development Kit (CDK)

A lot of the time when you are using AWS you are building resources, like S3 buckets or DynamoDB. In these labs we used the Boto3 SDK to build the resources in the account. Whilst this is a valid way of building resources as code, there are alternatives.

AWS has a common language called CloudFormation which allows you to provision AWS and third party application resources in your cloud environment. It uses either JSON or YAML to define your configuration.

The AWS Cloud Development Kit is an open source development framework to model and provision your cloud application resources using familiar programming languages including python, which provisions your resources through AWS CloudFormation. There is a CDK workshop that will allow you to apply what you have learned in this workshop to the CDK and extend your knowledge further.