google / cloud-forensics-utils

Python library to carry out DFIR analysis on the Cloud
Apache License 2.0
464 stars 88 forks source link

Support environment variable credentials for AWS #308

Closed ramo-j closed 3 years ago

ramo-j commented 3 years ago

Currently, if creds are specified in environment variables, which boto supports as a credential source, cfu still looks for creds in the default profile, and if the profile doesn't exist, errors.

$ env | grep AWS
AWS_SECRET_ACCESS_KEY=snip
AWS_ACCESS_KEY_ID=snip
$ cloudforensics aws ap-southeast-2a listinstances
<snip>
botocore.exceptions.ProfileNotFound: The config profile (default) could not be found

The utility should be updated to support environment variables as a credential source.