How can the SysOps administrator create a policy to meet this requirement?
Turn on AWS CloudTrail. Generate a policy by using AWS Security Hub.
Turn on Amazon EventBridge (Amazon CloudWatch Events). Generate a policy by using AWS Identity and Access Management Access Analyzer.
Use the AWS CLI to run the get-generated-policy command in AWS Identity and Access Management Access Analyzer.
Turn on AWS CloudTrail. Generate a policy by using AWS Identity and Access Management Access Analyzer.
Explanations:
AWS CloudTrail records API activity but does not generate IAM policies directly. AWS Security Hub is for security compliance and does not generate IAM policies.
Amazon EventBridge (CloudWatch Events) is used for event-driven architectures, not for generating IAM policies. AWS Identity and Access Management Access Analyzer does not use EventBridge for policy generation.
The AWS CLI command “get-generated-policy” does not exist in AWS IAM Access Analyzer. IAM Access Analyzer can generate policies, but not through this command.
AWS CloudTrail can log API activity, and AWS IAM Access Analyzer can analyze the logs to generate a policy that grants only the required permissions based on actual usage.