Using Console
Using CLI
<event-bus-name>
with the name of the event bus that you want to remediate and <statement-id>
with the ID of the statement in the event bus policy that is allowing public access.<event-bus-name>
with the name of the event bus that you remediated. The output should show that the event bus policy no longer allows public access.By following these steps, you can remediate the misconfiguration “Event Bus Should Not Be Exposed” for AWS using AWS CLI.Using Python
region
, event_bus_name
, and policy
variables with the appropriate values for your use case. Also, ensure that you have the necessary permissions to create IAM policies and attach them to the AWS account.