removing the depreciation warning when calling key_pair from an aws server