Modified to work from aws