The Amazon DRM protection aims to protect the copyright of Amazon content. If you just remove the DRM of Amazon Prime videos and Amazon Music for personal collection and playback, it is legal. As long as you don't use the downloads for commercial usage, you won't be violating Amazon's terms of service or any laws.