Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hybrid Cloud for Developers

You're reading from   Hybrid Cloud for Developers Develop and deploy cost-effective applications on the AWS and OpenStack platforms with ease

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788830874
Length 280 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Manoj Hirway Manoj Hirway
Author Profile Icon Manoj Hirway
Manoj Hirway
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introducing Hybrid Clouds FREE CHAPTER 2. Exploring AWS Cloud 3. Exploring OpenStack Private Cloud 4. Developing AWS Cloud Applications 5. Developing OpenStack Applications 6. Cloud Migration 7. Hybrid Cloud Best Practices 8. Monitoring and Troubleshooting Hybrid Cloud 9. Hybrid Cloud Security 10. Other Books You May Enjoy

Developing Amazon RDS applications – Unix


The boto3 Python library provides a rich set of classes and function to manipulate RDS database instances. 

Creating an RDS instance

The RDS database instance can be created using the create_db_instance() function. It requires the parameters that define the instance such as instance identifier, master user name, master user password, instance class, type of database engine such as Oracle, MySQL, and so on, and the storage to be allocated to the instance.

The following Python code demonstrates the creation of a MySQL database instance with the name packtpub with 5 GB in size:

#!/usr/bin/env python

import boto3
rds = boto3.client('rds')
try:
        response = rds.create_db_instance(
        DBInstanceIdentifier='packtpub',
        MasterUsername='dbadmin',
        MasterUserPassword='password',
        DBInstanceClass='db.t2.micro',
        Engine='mysql',
        AllocatedStorage=5)
        print response
except Exception as error:
        print error...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime