In Ansible <= 2.9 the module_defaults keyword supports a hardcoded list of groups to define common arguments for actions. The actions in each group are also hardcoded in core. For example, the group aws contains the modules ec2 and aws_s3, and can be used like this:
module_defaults:
group/aws:
aws_access_key_id: "{{ access_key }}"
aws_secret_access_key: "{{ secret_key }}"
tasks:
- aws_s3: ...