AWS CloudFormation VPC 终端节点创建
国际区:
SQSEndpoint:
Type: 'AWS::EC2::VPCEndpoint'
Properties:
PrivateDnsEnabled: true
VpcEndpointType: Interface
PolicyDocument:
Version: '2012-10-17'
Statement:
Effect: Allow
Principal:
AWS: !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:root
Action: SQS:*
Resource: !Sub 'arn:${AWS::Partition}:sqs:${AWS::Region}:${AWS::AccountId}:*'
ServiceName: !Sub 'com.amazonaws.${AWS::Region}.sqs'
SecurityGroupIds:
- !Ref securityGroupSQSEndpoint
VpcId: !Ref VPC
SubnetIds:
- !Ref PrivateSubnet1
- !Ref PrivateSubnet2
中国区:
SQSEndpoint:
Type: 'AWS::EC2::VPCEndpoint'
Properties:
PrivateDnsEnabled: true
VpcEndpointType: Interface
PolicyDocument:
Version: '2012-10-17'
Statement:
Effect: Allow
Principal:
AWS: !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:root
Action: SQS:*
Resource: !Sub 'arn:${AWS::Partition}:sqs:${AWS::Region}:${AWS::AccountId}:*'
ServiceName: !Sub 'cn.com.amazonaws.${AWS::Region}.sqs'
SecurityGroupIds:
- !Ref securityGroupSQSEndpoint
VpcId: !Ref VPC
SubnetIds:
- !Ref PrivateSubnet1
- !Ref PrivateSubnet2