I am trying to get started with the AWS CLI on OSX. I installed aws
via pip. I have created a new user in IAM and attached the pre-built AdministratorAcce
Your AWS CLI is getting credentials from somewhere else. See Configuration Settings and Precedence
Make sure it is not getting the credentials from environment variables or from other locations. The AWS CLI looks for credentials and configuration settings in the following order:
Make sure you are not creating the security group in VPC, if this is the case you need to pass default VPC ID as a parameter.
Also try this with different regions:
aws configure set region <regions>
aws ec2 describe-security-groups
NOTE: AWS has started providing default VPC's in most of the regions.
Hope this helps and resolve your issue.
In my case this was caused by not having the correct policy attached to the IAM user I was authenticating with.
Attach the AmazonEC2FullAccess
policy to the user in the IAM Management Console and the command should work.