Using Console
Using CLI
<your-domain-name>
with the name of your AWS OpenSearch domain.
AuditLogEnabled
parameter is set to true
in the output.
Using Python
'your-domain-name'
with the actual name of your OpenSearch domain in the script.Step 4: Replace 'arn:aws:iam::123456789012:role/OpenSearch-Audit-Role'
with the ARN of the IAM role that should have permission to write audit logs.Step 5: Run the Python script. This will enable Audit Logging for the specified OpenSearch domain.After following these steps, Audit Logging should be successfully enabled for your AWS OpenSearch domain.