This repository contains code samples that will show you how to use Amazon Bedrock Agents along with the Large Language Models (LLMs) on Amazon Bedrock to provide an easy-to-use natural language interface to strategize, plan, and execute your data backup objectives using AWS Backup.
AWS Backup is a fully managed backup service centralizing and automating the backup of data across AWS services. AWS Backup provides an orchestration layer that integrates Amazon CloudWatch, AWS CloudTrail, AWS Identity and Access Management (IAM), AWS Organizations, and other services. This centralized, AWS Cloud native solution provides global backup capabilities that can help you achieve your disaster recovery and compliance requirements. Using AWS Backup, you can centrally configure backup policies and monitor backup activity for AWS resources.
When creating a data backup strategy, you will need to understand the concepts, best practices, and architecture principles behind data backup and recovery. You would want to make sure all your resources are covered. While these can be challenging, configuring AWS Backup for your backup objectives requires knowledge of AWS Backup APIs, and how to invoke one or more of them in a sequence based on your requirements. AI agents can help with all these.
- Choose an AWS Account to use and make sure to create all resources in that Account.
- Identify an AWS Region that has Amazon Bedrock with Anthropic Claude 3.5 Haiku v1, Anthropic Claude 3.5 Sonnet v2 / 3.7 Sonnet v1, and Amazon Titan Text Embeddings v2 models.
- In that Region, copy the following file to a new or existing Amazon S3 bucket of your choice. Make sure that this bucket can be read by AWS CloudFormation.
- Create the Lambda layer file named
py313_opensearch-py_requests_and_requests-aws4auth.zip
using the following procedure and upload it to the same Amazon S3 bucket as in step 3.- On Windows 10 or above:
- Make sure Python 3.13 and pip are installed and set in the user's PATH variable.
- Download 7-zip and install it in
C:/Program Files/7-Zip/
. - Open the Windows command prompt.
- Create a new directory and
cd
into it. - Run the lambda_layer_file_create.bat from inside of that directory.
- This will create the Lambda layer file named
py313_opensearch-py_requests_and_requests-aws4auth.zip
.
- On Linux:
- Make sure Python 3.13 and pip are installed and set in the user's PATH variable.
- Open the Linux command prompt.
- Create a new directory and
cd
into it. - Run the lambda_layer_file_create.sh from inside of that directory.
- This will create the Lambda layer file named
py313_opensearch-py_requests_and_requests-aws4auth.zip
.
- On Windows 10 or above:
- Take the provided AWS CloudFormation template backup-assistant-with-ai-agents-cfn.yaml and update the following parameter,
- DeploymentArtifactsS3BucketName - set this to the name of the Amazon S3 bucket from step 3.
- Create an AWS CloudFormation stack with the updated template.
- Open the Jupyter notebook named aws-backup-automation-with-ai-agents.ipynb by navigating to the Amazon SageMaker AI notebook instances console and clicking on the Open Jupyter link on the instance named backup-assistant-instance.
This repository contains
- An assets folder that contains the AWS CloudFormation template and the dependent artifacts.
- The Python code for an AWS Lambda function that will be invoked by the Bedrock Agent to perform the supported AWS Backup operations. This is also zipped into this file as a dependent artifact.
- A notebooks folder that contains all the artifacts related to the Jupyter notebook that you will be working on.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.