12Modules6Plugins1Dependency
Ansible Collection for Amazon AI and ML Resources
The amazon.ai Ansible Collection provides automation modules for AWS AI and ML services. Currently, the collection includes modules for:
- Amazon DevOps Guru: configure monitoring, manage insights, and integrate notification channels.
- Amazon Bedrock: interact with foundation models for AI/ML applications.
The collection is designed to be extensible and will grow to support additional services such as Amazon SageMaker, Rekognition, Comprehend, Translate, and Textract.
As a Red Hat Ansible Certified Content, this collection is entitled to support through Ansible Automation Platform (AAP) through the Red Hat Ansible team.
At the amazon.ai collection, our mission is to empower users to deploy and manage AWS AI/ML services using simple, declarative automation workflows with Ansible.
We aim to lower the barrier to entry for machine learning operations (MLOps) on AWS, enabling developers, data scientists, and DevOps engineers to build intelligent applications faster and more reliably.
We follow the Ansible Code of Conduct in all our interactions within this project.
If you encounter abusive behavior, please refer to the policy violations section of the Code for information on how to raise a complaint.
For more information about communication, see the Ansible communication guide.
This collection has been tested against the following Ansible versions: >=2.17.0.
Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible.
This collection depends on the AWS SDK for Python (Boto3 and Botocore). Due to the AWS SDK Python Support Policy this collection requires Python 3.9 or greater.
Version 1.0.0 of this collection supports boto3 >= 1.35.0 and botocore >= 1.35.0.
| Name | Description |
|---|---|
| amazon.ai.bedrock_agent | Manage Amazon Bedrock Agents |
| amazon.ai.bedrock_agent_action_group | Manage Amazon Bedrock Agent Action Groups |
| amazon.ai.bedrock_agent_action_group_info | Gather information about a Bedrock Agent's Action Groups |
| amazon.ai.bedrock_agent_alias | Manage Amazon Bedrock Agent Aliases |
| amazon.ai.bedrock_agent_alias_info | Gather information about a Bedrock Agent's Aliases |
| amazon.ai.bedrock_agent_info | Gather information about Bedrock Agents |
| amazon.ai.bedrock_foundation_models_info | List or get details for Amazon Bedrock foundation models |
| amazon.ai.bedrock_invoke_agent | Invoke an Amazon Bedrock agent with a prompt |
| amazon.ai.bedrock_invoke_model | Run inference using Amazon Bedrock models |
| amazon.ai.devopsguru_insight_info | Fetch information about Amazon DevOps Guru insights |
| amazon.ai.devopsguru_resource_collection | Manage DevOps Guru resource collections |
| amazon.ai.devopsguru_resource_collection_info | Fetch information about Amazon DevOps Guru resource collection |
To consume this Collection from Automation Hub, please ensure that you add the following lines to your ansible.cfg file.
[galaxy]
server_list = automation_hub
[galaxy_server.automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=<SecretToken>
The token can be obtained from the Automation Hub Web UI.
Once the above steps are done, you can run the following command to install the collection.
ansible-galaxy collection install amazon.ai
You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml, using the format:
---
collections:
- name: amazon.ai
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version 1.0.0:
ansible-galaxy collection install amazon.ai:==1.0.0
See using Ansible collections for more details.
The Python module dependencies are not installed by ansible-galaxy. They can
be manually installed using pip:
pip install -r requirements.txt
or:
pip install boto3 botocore
Refer to the following resources for more details:
You can either call modules, rulebooks and playbooks by their Fully Qualified Collection Name (FQCN), such as amazon.ai.bedrock_agent, or you can call modules by their short name if you list the amazon.ai collection in the playbook's collections keyword:
---
- name: Create Bedrock Agent
amazon.ai.bedrock_agent:
state: present
agent_name: "{{ agent_name }}"
foundation_model: "{{ foundation_model }}"
instruction: "{{ instruction }}"
agent_resource_role_arn: "{{ agent_role_arn }}"
- name: Create Bedrock Agent Alias
amazon.ai.bedrock_agent_alias:
state: present
agent_name: "{{ agent_name }}"
alias_name: "{{ alias_name }}"
The project uses ansible-lint and black. Assuming this repository is checked out in the proper structure, e.g. collections_root/ansible_collections/amazon/ai/, run:
tox -e ansible-lint
or
tox -e black
Sanity and unit tests are run as normal:
ansible-test sanity
If you want to run cloud integration tests, ensure you log in to the cloud:
# using the "default" profile on AWS
aws configure set aws_access_key_id my-access-key
aws configure set aws_secret_access_key my-secret-key
aws configure set region eu-north-1
ansible-test integration [target]
This collection is tested using GitHub Actions.
The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software.
We are actively accepting new contributors and all types of contributions are very welcome.
Don't know how to start? Refer to the Ansible community guide!
As Red Hat Ansible Certified Content, this collection is entitled to support through the Ansible Automation Platform (AAP) using the Create issue button on the top right corner. If a support case cannot be opened with Red Hat and the collection has been obtained either from Galaxy or GitHub, there may community help available on the Ansible Forum.
You can also join us on:
#ansible-aws irc.libera.chat channelSee the changelog.
GNU General Public License v3.0 or later.
See LICENSE to see the full text.
| Product |
|---|
| Red Hat Ansible Automation Platform 2.6 |
| Red Hat Ansible Automation Platform 2.4 |
| Red Hat Ansible Automation Platform 2.5 |
This collection requires the following collections for use:
| Name | Summary |
|---|
The Red Hat Ecosystem Catalog is the official source for discovering and learning more about the Red Hat Ecosystem of both Red Hat and certified third-party products and services.
We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.