可能存在以下几种原因,导致AWS组织SCP策略在S3存储桶中未生效。
示例代码:
aws s3api get-bucket-policy --bucket mybucket
aws organizations describe-effective-policy --policy-type service-control-policy --target-id ou-1111111111111
aws organizations describe-policy --policy-id p-examplepolicyid1234 --query 'Policy.PolicySummary.TargetIds'
aws organizations list-policies --filter SERVICE_CONTROL_POLICY
aws organizations list-targets-for-policy --policy-id p-examplepolicyid1234
(以上示例代码中的 mybucket、ou-1111111111111、p-examplepolicyid1234 仅供参考,应替换为相应的实际值。)