Is there a way to block public access to s3 at the account level using cloud formation? I tried adding this block to my CF template but it fails saying resource could not be created. Does it expect this to be done ONLY at the bucket level? When navigating the AWS UI there is a way to block it at the account level and I'm trying to replicate that using CF.
# Block S3 public access
BlockS3PublicAccess:
Type: AWS::S3::Bucket
Properties:
PublicAccessBlockConfiguration:
BlockPublicAcls: True
BlockPublicPolicy: True
IgnorePublicAcls: True
RestrictPublicBuckets: True