Amazon instance profiles are used to pass IAM roles to an EC2 instance. This IAM role can be queried using EC2 instance metadata to access an S3 bucket. Please check Amazon’s Official Documentation for more information.

Today we are happy to announce that starting with Percona XtraBackup 8.0.31-24, xbcloud can read instance metadata and fetch credentials from an instance profile, utilizing it to authenticate against an S3 bucket. Xbcloud is a tool part of Percona XtraBackup and allows you to upload and download backups to Amazon S3 storage.

How it works

Configure your EC2 instance with a valid instance profile as per this guide. Then run XtraBackup streaming to xbcloud without providing any credentials:

You should see a message indicating that the instance profile has been used:

Please note that tokens generated by the instance profile expire after six hours. In the case of an expired token, xbcloud will be able to use its retry algorithm and request a new token without aborting the backup:

Summary

Percona xbcloud can now utilize an instance profile allowing users to automate access to AWS S3 buckets by removing the need of access/secret-key being provided as parameters or configuration.

Percona XtraBackup is a free, open source, complete online backup solution for all versions of Percona Server for MySQL and MySQL. It performs online non-blocking, tightly compressed, highly secure backups on transactional systems so that applications remain fully available during planned maintenance windows.

Download Percona XtraBackup

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments