Move AWS_ACCESS_KEY fetching to a saner function