简体   繁体   English

如何使用默认VPC将入站规则添加到AWS安全组?

[英]How to add inbound rule to AWS security group with my default VPC?

I want to add inbound rule to security group with my default VPC. 我想使用默认VPC将入站规则添加到安全组。 I removed default VPC from a zone and added a default VPC. 我从区域中删除了默认VPC,并添加了默认VPC。 But I get fault below : 但是我在下面遇到了错误:

"[AmazonServiceException: Status Code: 400, AWS Service: AmazonEC2, AWS Request ID: c99a21bb-c798-4938-994f-ef8b89c64a72, AWS Error Code: VPCIdNotSpecified, AWS Error Message: No default VPC for this user]"

I can add ingress rule on AWS but I can't this on my project which is developed with AWS API. 我可以在AWS上添加入口规则,但不能在使用AWS API开发的项目中添加入口规则。

How can I do? 我能怎么做?

I solved. 我解决了 While I am adding rule, I post security groupId instead of groupName. 添加规则时,我发布了安全groupId而不是groupName。

If you are a “VPC Only” customer, and have your Default VPC deleted, then during ingress action , you need to specify the VPC ID (or subnet ID of another VPC). 如果您是“仅VPC”客户,并且删除了默认VPC,则在进行入口操作时,您需要指定VPC ID(或另一个VPC的子网ID)。 If you do not specify it, then default VPC will be presumed. 如果未指定,则将使用默认VPC。

In your case, it seems like you have your default VPC deleted. 就您而言,您似乎已删除了默认VPC。 OR You are not passing the VPC ID (or subnet ID of another VPC). 或您没有传递VPC ID(或另一个VPC的子网ID)。

So Either pass the VPC ID (or subnet ID of another VPC) OR have AWS technical support create a new default VPC for you. 因此,要么传递VPC ID(或另一个VPC的子网ID),要么让AWS技术支持为您创建一个新的默认VPC。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Boto将入站规则添加到AWS默认VPC安全组 - How to add inbound rule to AWS default VPC security group using boto Boto3 向非默认 VPC 中的安全组添加入站规则 - Boto3 Adding an Inbound Rule to a Security Group in a Non Default VPC 将入站规则添加到安全组 aws cdk - Add inbound rule to security group aws cdk 如何将HTTPS入站规则添加到Amazon AWS EC2实例上的安全组? - How to add a HTTPS inbound rule to a security group on an Amazon AWS EC2 instance? 如何将 beantalk 应用程序作为入站规则添加到安全组 - How to add a beanstalk app to a security group as a inbound rule 使用 Terraform (AWS) 将安全组添加到另一个安全组的入站规则作为源 - Add a Security Group to the Inbound Rule of another Security Group as a Source with Terraform (AWS) AWS 安全组:入站规则的来源与安全组名称相同吗? - AWS Security group : source of inbound rule same as security group name? 如何使用 vpc 安全组来限制对我的 Lambda 的入站访问? - How can I use a vpc security group to restrict inbound access to my Lambda? 如何在 CDK (AWS) 中将安全组添加到 VPC 端点 - How to add security group to VPC Endpoint in CDK (AWS) AWS 安全组入站规则。 允许 lambda 函数 - AWS security group inbound rule. allow lambda function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM