Monday, November 25, 2013

Required option -O is missing using AWS CLI (Command Line Interface)

If you get error required option -O is missing using AWS CLI it's because you need to provide the
AWS Access Key ID and AWS Secret Access Key when sending commannds.

You could add these keys to every command you type by tacking them on when you type out the command but that will get a bit tiresome.

The other option is to add environment variables which contain the keys: AWS_ACCESS_KEY and AWS_SECRET_KEY

Or you can put the configuration in a file and set the AWS_CONFIG_FILE environment variable pointing to the file as explained here:


Note that if you are trying to run an application on an EC2 instance you should probably be using roles: