Review API diagnostic logging for the Ansible S3 task

API diagnostics for an Ansible S3 task and bucket access audit logs are separate settings.

Description

Ansible’s debug_botocore_endpoint_logs lists the distinct AWS API actions a task calls in resource_actions. S3 server access logging is configured separately.

Potential impact

This list omits individual requests and other clients’ activity. Using it as your bucket audit trail leaves gaps.

Remediation

Enable the diagnostic option when you need to see which APIs a task calls. To audit bucket access, configure S3 server access logging or the relevant CloudTrail data events. Verify delivery, restrict log access, and set a retention period.

Examples

Before

yaml
- name: S3 버킷 생성
  amazon.aws.s3_bucket:
    name: mys3bucket
    state: present
    debug_botocore_endpoint_logs: false

After

yaml
- name: S3 버킷 생성
  amazon.aws.s3_bucket:
    name: mys3bucket
    state: present
    debug_botocore_endpoint_logs: true

Changing the value from false to true adds the API action list to the task result.

References