# 限制对 VPC 配置的更改

在您设计并部署了支持跨境数据传输要求（包括网络数据流）的 AWS 基础设施后，您可能希望防止修改。以下服务控制策略有助于防止 VPC 配置漂移或无意修改。它拒绝新的 Internet 网关附件、VPC 对等连接、中转网关附件和新的 VPN 连接。有关此政策如何帮助保护组织中的隐私和个人数据的详细信息，请参阅本指南中[的 AWS Transit Gateway](https://docs.aws.amazon.com/prescriptive-guidance/latest/privacy-reference-architecture/network-account.html#transit-gateway)。

```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "ec2:AttachInternetGateway",
                "ec2:CreateInternetGateway",
                "ec2:AttachEgressOnlyInternetGateway",
                "ec2:CreateVpcPeeringConnection",
                "ec2:AcceptVpcPeeringConnection",
                "ec2:CreateVpc",
                "ec2:CreateSubnet", 
                "ec2:CreateRouteTable",
                "ec2:CreateRoute",
                "ec2:AssociateRouteTable", 
                "ec2:ModifyVpcAttribute",
                "ec2:*TransitGateway",
                "ec2:*TransitGateway*",
                "globalaccelerator:Create*",
                "globalaccelerator:Update*"
                
            ],
            "Resource": "*",
            "Effect": "Deny",
            "Condition": {
                "ArnNotLike": {
                    "aws:PrincipalARN": [
                        "arn:aws:iam::*:role/Role1AllowedToBypassThisSCP",
                        "arn:aws:iam::*:role/Role2AllowedToBypassThisSCP"
                    ]
                }
            }          
        }
    ]
}
```
