禁用不使用的服务和区域
在云上建议禁用不使用的服务和区域,主要是出于以下几个原因:
提高安全性:禁用不使用的云服务和区域可以减少潜在的攻击面,降低数据泄露和未授权访问的风险。
节省成本:通过停用未使用的服务,企业可以避免不必要的费用,优化资源使用,实现成本效益。
简化管理:减少管理的云服务数量有助于简化监控和维护工作,提高整体的运维效率。
添加SCP禁用不使用的服务和区域
识别常用的服务和区域
通过Cost Explorer可以知道自己使用了哪些服务,哪些区域,不使用的服务和区域就可以通过SCP进行禁用。
添加SCP禁用不使用的服务和区域
添加SCP到你的账户或者组织上,参考文档进行配置:https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_general.html#example-scp-deny-region
修改里面的服务和区域为自己要使用的,没有指明的就会被禁用:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyAllOutsideEU",
"Effect": "Deny",
"NotAction": [
"a4b:*",
"acm:*",
"aws-marketplace-management:*",
"aws-marketplace:*",
"aws-portal:*",
"budgets:*",
"ce:*",
"chime:*",
"cloudfront:*",
"config:*",
"cur:*",
"directconnect:*",
"ec2:DescribeRegions",
"ec2:DescribeTransitGateways",
"ec2:DescribeVpnGateways",
"fms:*",
"globalaccelerator:*",
"health:*",
"iam:*",
"importexport:*",
"kms:*",
"mobileanalytics:*",
"networkmanager:*",
"organizations:*",
"pricing:*",
"route53:*",
"route53domains:*",
"route53-recovery-cluster:*",
"route53-recovery-control-config:*",
"route53-recovery-readiness:*",
"s3:GetAccountPublic*",
"s3:ListAllMyBuckets",
"s3:ListMultiRegionAccessPoints",
"s3:PutAccountPublic*",
"shield:*",
"sts:*",
"support:*",
"trustedadvisor:*",
"waf-regional:*",
"waf:*",
"wafv2:*",
"wellarchitected:*"
],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"eu-central-1",
"eu-west-1"
]
},
"ArnNotLike": {
"aws:PrincipalARN": [
"arn:aws:iam::*:role/Role1AllowedToBypassThisSCP",
"arn:aws:iam::*:role/Role2AllowedToBypassThisSCP"
]
}
}
}
]
}
最后更新于