Updating existing AWS cloud modules to boto3

Hi,

I’m currently using a lot of extras and core AWS modules and have written a few myself. I’m wondering what is the etiquette for getting older modules using the older API’s (API’s that are no longer developed or supported) to using the newer Boto3.

Obviously new modules should be written using Boto3 but given the fact the older API is not being updated there needs to be a process to rewrite them. I’m not sure it’s practical support boto, boto2 and boto3 by merging additional boto3 code either as this will make the modules over complex and verbose which sort of defeats the purpose of having them.

An example is the following RDS module.
https://github.com/ansible/ansible-modules-core/blob/devel/cloud/amazon/rds.py

I have rewritten this module using the newer boto3 API because I needed to use the newer functionality, but I don’t want to upset anyone by submitting it as a new module PR.
https://github.com/naslanidis/ansible-modules-extras/blob/updated_rds_boto3_module/cloud/amazon/rds_boto3.py

So my question is, what is the best way to go about sharing my changes when a complete rewrite of a module is required like this RDS one. I’m just interested in thoughts on how to approach situations like this.

Thanks.
Nick.

I do not think you will not upset anyone by submitting a PR. I know that the Ansible Core team is trying to maintain compatibility with organizations that are using Ansible on older platforms. i say submit the PR and see what the core team says. I know they are trying to push forward with all new AWS modules using Boto3. You can see from this PR https://github.com/ansible/ansible-modules-extras/pull/1846 that I wrote to make ec2_vpc_route_table to be 100% boto3. I suggest that you write some tests with that module, which is exactly what I am in the process of doing right now for that PR and just wait and see :slight_smile:

Other recipients:

Thanks Allen. In your link, there is basically an answer my question: "@linuxdynasty after talking this over with the core team, we wanted new modules after 2.0 to be in boto3, but weren’t going to rewrite modules with boto3 until Ansible v2.3,

Thanks Allen.

In your link, there is basically an answer my question:

@linuxdynasty after talking this over with the core team, we wanted new modules after 2.0 to be in boto3, but weren’t going to rewrite modules with boto3 until Ansible v2.3, which is in fact right around the corner. So keep this PR open, and once we start accepting 2.3 changes (in around a month) we’ll be able to merge this change.”

There’s still a couple of functions I can add to the boto3 version I’ve written so I will finish those and submit a PR to hopefully get it included in 2.3.