Introducing Amazon AWS Cloud Automation 8.0.0
This blog article introduces the new features of amazon.aws and offers a peek at the improvements. Release 8.0.0 of Ansible Content Collection. Let’s investigate the main points!
Highlights of new features
Numerous new features are included in this edition. Come with me while we examine!
Lambda_event (collection module) on amazon.aws.
The `amazon.aws.lambda_event} module now supports the `maximum_batching_window_in_seconds} setting. With this option, you may set the maximum number of seconds that Lambda will spend collecting records prior to calling the function. You can adjust this to any number between 0 and 300 seconds.
In the case of streams (such Amazon Kinesis and Amazon DynamoDB Streams) and Amazon SQS event sources, the default value is 1 second if `batch_size` exceeds 10 and `maximum_batching_window_in_seconds} is not specified. Be aware that FIFO queues do not support this option.
Use case: maximizing the frequency of Lambda invocations to reduce expenses
Assume that an Amazon SQS queue sends messages to a Lambda function. The function is called a lot, which results in many executions and increased expenses. The goal is to minimize the number of invocations while maintaining the function’s ability to process messages quickly.
To expand the batching window and collect additional records before each invocation, use the `maximum_batching_window_in_seconds} option in the `amazon.aws.lambda_event}module. This strategy maximizes the number of invocations while offering significant cost savings.
Amazon.aws.rds_instance (the module for collection)
To erase all existing exports, the `amazon.aws.rds_instance} module now supports setting an empty list to `enable_cloudwatch_logs_exports}. You may select which log types to allow for exporting to CloudWatch Logs with the {enable_cloudwatch_logs_exports} option. See Publishing Database Logs to Amazon CloudWatch Logs in the Amazon RDS User Guide for additional details.
Use case: For maintenance, disable log exports.
Let’s say that in order to minimize logging overhead and concentrate on important system performance during a maintenance window, you must temporarily block all log exports from an RDS instance to CloudWatch Logs.
Use the new `enable_cloudwatch_logs_exports} option in the `amazon.aws.rds_instance} module and set it to an empty list to disable all existing log exports. By taking this action, all logs will no longer be exported to CloudWatch Logs, preventing pointless logging from interfering with maintenance duties. You can re-enable the required log exports after the maintenance window.
The new Ansible support guidelines
This collection release removes support for `ansible-core<2.15}, which went EOL on May 20, 2024, and introduces a number of deprecations in the modules. See the Ansible release documentation for further details.
Outdated functionalities
A few module deprecations are also included in this collection release.
Disrupting modifications
Additionally, certain revolutionary modifications to the collection’s modules are included in this release.
Modifications for developers
The following modifications might be of interest to you if you actively contribute to the amazon.aws collection or would like to do so:
Code quality improvement
A number of important efforts are now under progress in a continuous attempt to improve the code quality inside the collection.
First off, restructuring important modules like the S3, EC2, and RDS modules is receiving a lot of attention. In order to provide a more seamless user experience, this reworking attempts to increase code readability, maintainability, and performance. The s3_bucket module has been completely refactored and included in this release.
Additionally, redundant code segments are found and eliminated from a number of modules, such as `s3_object}, {cloudtrail}, {ec2_instance}, `ec2_vol}, {elb_classic_lb{, {kms_key}, and {autoscaling_group}. By streamlining the codebase and decreasing complexity, this cleanup procedure improves maintainability overall.
It’s crucial to remember that refactoring work is still being done on a number of other modules in the collection. These modules are planned for restructuring in future releases to further improve code quality and user experience, even though they are not included in the current release.
Furthermore, an attempt is being made to maintain the RETURN block of plugins current. For user comprehension and efficient application, the output data structure that these modules return must be accurate and thorough. We updated the documentation for a few EC2 modules’ RETURN blocks in this release.
Additionally, the new Ansible semantic markdown is being incorporated into the plugin documentation to improve it. More information. The purpose of this update is to make the documentation easier to read and understand so that people can use it more easily.
All of the collection’s modules are included in these efforts, which will be mirrored in future releases, giving users access to cleaner, more effective, and better-documented code overall.