Modified to use aws command line (still needs much work)