Debian Codegraph @

ansible_collections/amazon/aws/README.md

raw
1 [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ansible-collections_amazon.aws&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=ansible-collections_amazon.aws)
2 [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=ansible-collections_amazon.aws&metric=coverage)](https://sonarcloud.io/summary/new_code?id=ansible-collections_amazon.aws)
3 [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=ansible-collections_amazon.aws&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=ansible-collections_amazon.aws)
4 [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=ansible-collections_amazon.aws&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=ansible-collections_amazon.aws)
5 [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=ansible-collections_amazon.aws&metric=bugs)](https://sonarcloud.io/summary/new_code?id=ansible-collections_amazon.aws)
6 [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=ansible-collections_amazon.aws&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=ansible-collections_amazon.aws)
7 [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=ansible-collections_amazon.aws&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=ansible-collections_amazon.aws)
8
9 # Amazon AWS Collection
10 The Ansible Amazon AWS collection includes a variety of Ansible content to help automate the management of AWS services. This collection is maintained by the Ansible Cloud Content team.
11
12 ## Contents
13
14 - [Description](#description)
15 - [Communication](#communication)
16 - [Requirements](#requirements)
17 - [Ansible version compatibility](#ansible-version-compatibility)
18 - [Python version compatibility](#python-version-compatibility)
19 - [AWS SDK version compatibility](#aws-sdk-version-compatibility)
20 - [Event source plugin compatibility](#event-source-plugin-compatibility)
21 - [Included content](#included-content)
22 - [Installation](#installation)
23 - [Use Cases](#use-cases)
24 - [Testing](#testing)
25 - [Contributing to this collection](#contributing-to-this-collection)
26 - [More information about contributing](#more-information-about-contributing)
27 - [Support](#support)
28 - [Release notes](#release-notes)
29 - [Related Information](#related-information)
30 - [License Information](#license-information)
31
32 ## Description
33
34 The primary purpose of this collection is to simplify and streamline the management of AWS resources through automation. By leveraging this collection, organizations can reduce manual intervention, minimize errors, and ensure consistent and repeatable deployments. This leads to increased efficiency, faster deployments, and a more agile IT infrastructure.
35
36 AWS-related modules and plugins supported by the Ansible community are in the [community.aws](https://github.com/ansible-collections/community.aws/) collection.
37
38 Being Red Hat Ansible Certified Content, this collection is eligible for support through the [Ansible Automation Platform](https://www.redhat.com/en/technologies/management/ansible).
39
40 ## Communication
41
42 * Join the Ansible forum:
43 * [Get Help](https://forum.ansible.com/c/help/6): get help or help others.
44 * [Posts tagged with 'aws'](https://forum.ansible.com/tag/aws): subscribe to participate in collection-related conversations.
45 * [AWS Working Group](https://forum.ansible.com/g/AWS): by joining the team, you will automatically be subscribed to posts tagged with [aws](https://forum.ansible.com/tags).
46 * [Social Spaces](https://forum.ansible.com/c/chat/4): gather and interact with fellow enthusiasts.
47 * [News & Announcements](https://forum.ansible.com/c/news/5): track project-wide announcements including social events.
48
49 * The Ansible [Bullhorn newsletter](https://docs.ansible.com/ansible/devel/community/communication.html#the-bullhorn): used to announce releases and important changes.
50
51 For more information about communication, see the [Ansible communication guide](https://docs.ansible.com/ansible/devel/community/communication.html).
52
53 ## Requirements
54
55 ### Ansible version compatibility
56
57 The collection supports ansible-core versions based on `requires_ansible` in [meta/runtime.yml](meta/runtime.yml):
58 - Tested with Ansible Core 2.17.0 and later, and the current development version of Ansible. Ansible Core versions prior to 2.17.0 are not supported.
59
60 ### Python version compatibility
61
62 This collection depends on the AWS SDK for Python (Boto3 and Botocore). Due to the
63 [AWS SDK Python Support Policy](https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/)
64 this collection requires Python 3.8 or greater.
65
66 Amazon has also announced the planned end of support for
67 [Python versions below 3.9](https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/).
68 As such, support for Python versions below 3.9 will be removed in a release after 2026-05-01.
69
70 <!---
71 ### End of Support by Python Versions:
72
73 | Python Version | AWS SDK | Collection |
74 | -------------- | -------- | ---------- |
75 | 2.7 | July 2021 | Release 2.0.0 (September 2021) |
76 | 3.4 | February 2021 | Release 1.0.0 (June 2020) |
77 | 3.5 | February 2021 | Release 2.0.0 (September 2021) |
78 | 3.6 | May 2022 | Release 7.0.0 (November 2023) |
79 | 3.7 | December 2023 | *After December 2024* |
80 | 3.8 | April 2025 | *After April 2026* |
81 | 3.9 | April 2026 | *After April 2027* |
82 | 3.10 | April 2027 | *After April 2028* |
83 | 3.11 | April 2028 | *After April 2029* |
84 --->
85
86 ### AWS SDK version compatibility
87
88 Starting with the 2.0.0 releases of amazon.aws and community.aws, the collection's policy is generally to support the versions of `botocore` and `boto3` that were released within 12 months prior to the most recent major collection release, following semantic versioning (for example, 2.0.0, 3.0.0).
89
90 Version 11.0.0 of this collection supports `boto3 >= 1.35.0` and `botocore >= 1.35.0`
91
92 All support for the original AWS SDK `boto` was removed in release 4.0.0.
93
94 ### Event source plugin compatibility
95 `aiobotocore >= 2.14.0` is required to use the event source plugins `amazon.aws.aws_cloudtrail` and `amazon.aws.aws_sqs_queue`.
96
97 ## Included content
98 <!--start collection content-->
99 See the complete list of collection content in the [Plugin Index](https://ansible-collections.github.io/amazon.aws/branch/stable-11/collections/amazon/aws/index.html#plugin-index).
100
101 In addition, this collection includes two event source plugins located under the `extensions/eda/` folder:
102
103 | Plugin | Description |
104 | :--- | :--- |
105 | `amazon.aws.aws_cloudtrail` | An ansible-rulebook event source plugin that retrieves events from AWS CloudTrail |
106 | `amazon.aws.aws_sqs_queue` | An ansible-rulebook event source plugin that receives events via an AWS SQS queue |
107
108 <!--end collection content-->
109
110 ## Installation
111
112 The amazon.aws collection can be installed with the Ansible Galaxy command-line tool:
113
114 ```shell
115 ansible-galaxy collection install amazon.aws
116 ```
117
118 You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the following format:
119
120 ```yaml
121 ---
122 collections:
123 - name: amazon.aws
124 ```
125
126 Note that if you install any collections from Ansible Galaxy, they will not be upgraded automatically when you upgrade the Ansible package.
127 To upgrade the collection to the latest available version, run the following command:
128
129 ```shell
130 ansible-galaxy collection install amazon.aws --upgrade
131 ```
132 A specific version of the collection can be installed by using the `version` keyword in the `requirements.yml` file:
133
134 ```yaml
135 ---
136 collections:
137 - name: amazon.aws
138 version: 3.1.1
139 ```
140
141 or using the ansible-galaxy command as follows:
142
143 ```shell
144 ansible-galaxy collection install amazon.aws:==1.0.0
145 ```
146
147 The python module dependencies are not installed by `ansible-galaxy`. They can
148 be manually installed using pip:
149
150 ```shell
151 pip install -r requirements.txt
152 ```
153
154 or:
155
156 ```shell
157 pip install boto3 botocore
158 ```
159
160 Refer to the following for more details:
161
162 * [Amazon Web Services Guide](https://docs.ansible.com/ansible/latest/collections/amazon/aws/docsite/guide_aws.html)
163 * [Using Ansible collections](https://docs.ansible.com/ansible/latest/user_guide/collections_using.html)
164
165 ## Use Cases
166
167 You can call modules by their Fully Qualified Collection Name (FQCN), such as `amazon.aws.ec2_instance`, or by their short name if you list the `amazon.aws` collection in the playbook's `collections` keyword:
168
169 ```yaml
170 ---
171 - name: Setup an instance for testing
172 amazon.aws.ec2_instance:
173 name: '{{ ec2_instance_name }}'
174 instance_type: t2.nano
175 image_id: "{{ (amis.images | sort(attribute='creation_date') | last).image_id }}"
176 wait: yes
177 volumes:
178 - device_name: /dev/xvda
179 ebs:
180 volume_size: 8
181 delete_on_termination: true
182 register: instance
183
184 - name: Gather {{ ec2_instance_name }} info
185 amazon.aws.ec2_instance_info:
186 filters:
187 tag:Name: "{{ ec2_instance_name }}"
188 include_attributes:
189 - instanceType
190 - kernel
191 - ramdisk
192 - userData
193 - disableApiTermination
194 - instanceInitiatedShutdownBehavior
195 - rootDeviceName
196 - blockDeviceMapping
197 - productCodes
198 - sourceDestCheck
199 - groupSet
200 - ebsOptimized
201 - sriovNetSupport
202 - enclaveOptions
203 register: instance_info
204
205 - name: Delete instance created for tests
206 amazon.aws.ec2_instance:
207 state: absent
208 instance_ids: "{{ instance.instance_ids }}"
209 wait: false
210 ```
211
212 ## Testing
213
214 This collection is tested using GitHub Actions. To learn more about testing, refer to [CI.md](https://github.com/ansible-collections/amazon.aws/blob/stable-11/CI.md).
215
216 ## Contributing to this collection
217
218 We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the [Amazon AWS collection repository](https://github.com/ansible-collections/amazon.aws).
219 See [CONTRIBUTING.md](https://github.com/ansible-collections/amazon.aws/blob/stable-11/CONTRIBUTING.md) for more details.
220
221 ### More information about contributing
222
223 - [Ansible Community Guide](https://docs.ansible.com/ansible/latest/community/index.html) - Details on contributing to Ansible
224 - [Contributing to Collections](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html#contributing-to-collections) - How to check out collection git repositories correctly
225 - [Guidelines for Ansible Amazon AWS module development](https://docs.ansible.com/ansible/latest/collections/amazon/aws/docsite/dev_guidelines.html)
226 - [Getting Started With AWS Ansible Module Development and Community Contribution](https://www.ansible.com/blog/getting-started-with-aws-ansible-module-development)
227
228 ## Support
229
230
231 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 from Galaxy or GitHub, community help may be available on the [Ansible Forum](https://forum.ansible.com/).
232
233 You can also join us on:
234
235 - The ``#ansible-aws`` channel on [Libera.Chat](https://libera.chat/) (IRC)
236
237 ## Release notes
238
239 See the [rendered changelog](https://ansible-collections.github.io/amazon.aws/branch/stable-11/collections/amazon/aws/docsite/CHANGELOG.html) or the [raw generated changelog](https://github.com/ansible-collections/amazon.aws/tree/stable-11/CHANGELOG.rst).
240
241 ## Related Information
242
243 - [Ansible Collection overview](https://github.com/ansible-collections/overview)
244 - [Ansible User guide](https://docs.ansible.com/ansible/latest/user_guide/index.html)
245 - [Ansible Developer guide](https://docs.ansible.com/ansible/latest/dev_guide/index.html)
246 - [Ansible Collection Developer Guide](https://docs.ansible.com/ansible/devel/dev_guide/developing_collections.html)
247 - [Ansible Community code of conduct](https://docs.ansible.com/ansible/latest/community/code_of_conduct.html)
248
249 ## License Information
250
251 GNU General Public License v3.0 or later.
252
253 See [COPYING](https://www.gnu.org/licenses/gpl-3.0.txt) to see the full text.