Refactored to have all aws credentials resolving in one place