Book Image

Python Essentials for AWS Cloud Developers

By : Serkan Sakinmaz
4 (1)
Book Image

Python Essentials for AWS Cloud Developers

4 (1)
By: Serkan Sakinmaz

Overview of this book

AWS provides a vast variety of services for implementing Python applications, which can pose a challenge for those without an AWS background. This book addresses one of the more predominant problems of choosing the right service and stepping into the implementation of exciting Python apps using AWS. The book begins by showing you how to install Python and create an AWS account, before helping you explore AWS Lambda, EC2, Elastic Beanstalk, and S3 for Python programming. You'll then gain hands-on experience in using these services to build the Python application. As you advance, you'll discover how to debug Python apps using PyCharm, and then start deploying the Python applications on Elastic Beanstalk. You’ll also learn how to monitor Python applications using the CloudWatch service, along with creating and publishing APIs on AWS to access the Python application. The concluding chapters will help you get to grips with storing unstructured and semi-structured data using NoSQL and DynamoDB, as well as advance your knowledge using the Glue serverless data integration service in AWS. By the end of this Python book, you’ll be able to take your application development skills up a notch with AWS services and advance in your career.
Table of Contents (18 chapters)
1
Part 1: Python Installation and the Cloud
4
Part 2: A Deep Dive into AWS with Python
9
Part 3: Useful AWS Services to Implement Python

CloudWatch alarms

AWS has more than 100 services, and it is not easy to control the behavior of all the services. You need to be informed if some AWS services achieve a specific metric. In Chapter 4, we covered how to create a server with an EC2 service. For example, you define a server for an EC2 service, and sometimes, its CPU usage is more than 90%, causing some performance problems. Another example would be to add a notification if you exceed a specific cost in AWS. For these kinds of scenarios, you can define a metric, and if the metric is reached, you will be notified via email.

In this topic, we are going to create an alarm to notify us if AWS cost exceeds $10 in a month. Let’s implement the application:

  1. Click In alarm under the Alarms dropdown in the CloudWatch pane:

Figure 7.18 – In alarm

  1. Click Create Alarm. You can click either the button to the right or the one at the bottom:

Figure...