Easy way to control cost in AWS using Python

As you start  moving workloads to the AWS cloud and opening access to developers you will see a bill increasing every month without controls in place.

The best way to control and charge the cost to the correct department is with AWS tags. You can have tags assigned to different departments like Marketing, Research, Finance, etc. Now, if instances are created without proper tags you can have a program stop the instances. You accomplish two objectives with this approach. first you find out who is creating instances outside the processes you have put in place. Second, you get allocate charges to the correct departments

One of the challenges in AWS is keeping your cost under control and knowing when it makes sense to utilize specific resources. Sometimes because of compliance reasons you can not utilize RDS and need to use EC2 instances

To run the following code you need

  • AWS cli tools installed
  • Configure AWS keys via cli
  • Python3 installed
  • Import the boto3 library

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s