2 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
2
Are you in the same region using CLI?
répondu il y a 2 ans
AWS CLI does not have the option to specify the region
aws ec2 describe-security-groups --filters Name=vpc-id,Values=... --group-ids ...
An error occurred (InvalidGroup.NotFound) when calling the DescribeSecurityGroups operation: The security group '...' does not exist But I am on the security group page in the console now as we speak so it does exist.
2
Try adding in --region at the end of your CLI command to whatever region you see the Security Group in.
For example:
aws ec2 describe-security-groups ... --group-ids --region us-east-1
You can also run an aws configure get region to get the region of what region your CLI is setup for.
That would be my first look - ensure where you are looking in console matches the region in your CLI.
répondu il y a 2 ans
You are a genius! Bullseye! That solved my problem. Thank you very much!
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 mois
Search for the ENI to get the subnet and security group(s) it uses with the below command. Ensure you replace <ENI> and <REGION> placeholders with respective values. The output of the below command will be json which you can parse with something like jq. This should align with what you see in the console
aws ec2 describe-network-interfaces --network-interface-ids <ENI> --filters Name=network-interface-id,Values=ENI --region <REGION> --output json --query 'NetworkInterfaces[0].{Subnet:SubnetId,SecurityGroups:Groups[*].GroupId}')