Updated Code to migrate over AWS