With solution will accomplish this?
Create an AWS CloudFormation template that defines an AWS Inspector rule to check whether EBS encryption is enabled. Save the template to an Amazon S3 bucket that has been shared with all accounts within the company. Update the account creation script pointing to the CloudFormation template in Amazon S3.
Create an AWS Config organizational rule to check whether EBS encryption is enabled and deploy the rule using the AWS CLI. Create and apply an SCP to prohibit stopping and deleting AWS Config across the organization.
Create an SCP in Organizations. Set the policy to prevent the launch of Amazon EC2 instances without encryption on the EBS volumes using a conditional expression. Apply the SCP to all AWS accounts. Use Amazon Athena to analyze the AWS CloudTrail output, looking for events that deny an ec2:RunInstances action.
Deploy an IAM role to all accounts from a single trusted account. Build a pipeline with AWS CodePipeline with a stage in AWS Lambda to assume the IAM role, and list all EBS volumes in the account. Publish a report to Amazon S3.
Explanations:
AWS CloudFormation templates cannot directly check EBS encryption status. AWS Inspector is also not suited for this compliance check. CloudFormation is used for provisioning resources, not for compliance monitoring.
AWS Config can monitor EBS encryption status across all accounts in an organization. The rule can be applied at the organization level, and using AWS Config ensures continuous monitoring. The SCP ensures the rule is enforced by preventing deletion or disabling of AWS Config.
SCPs cannot directly enforce EBS encryption on EC2 instances. While SCPs control actions at the account level, they cannot enforce encryption on resources like EBS volumes. Athena and CloudTrail are not directly related to this compliance requirement.
While IAM roles and Lambda can be used to gather information on EBS volumes, this approach does not continuously monitor or enforce compliance in an automated manner like AWS Config does.