API calls throw AWS compatible exception

Fixes bug 1271529