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.
- Amazon SageMaker: manage SageMaker Code Repositories.
The collection is designed to be extensible and will grow to support additional services such as 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.
- Join the Ansible forum:
- Get Help: get help or help others. Please add appropriate tags if you start new discussions.
- Social Spaces: gather and interact with fellow enthusiasts.
- News & Announcements: track project-wide announcements including social events. The Bullhorn newsletter, which is used to announce releases and important changes, can also be found here.
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 |
| amazon.ai.sagemaker_code_repository | Manage Amazon SageMaker Code Repositories |
| amazon.ai.sagemaker_code_repository_info | Gather information about SageMaker Code Repositories |
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.aiYou 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.aiYou 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.0See 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.txtor:
pip install boto3 botocoreRefer to the following resources for more details:
- Amazon Web Services Guide
- using Ansible collections 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-lintor
tox -e blackSanity and unit tests are run as normal:
ansible-test sanityIf 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!
- Ansible user guide
- Ansible developer guide
- Ansible collections requirements
- Ansible community Code of Conduct
- The Bullhorn (the Ansible contributor newsletter)
- Important announcements for maintainers
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:
- Libera.Chat IRC - the
#ansible-awsirc.libera.chat channel
See the changelog.
GNU General Public License v3.0 or later.
See LICENSE to see the full text.