we did something like this, with the key inside. i cut a piece of wood the fit on the inside of the door to secure it more. although ours is not amazon basics brand...
Amazon Basics Wall Mounted Key Storage Box - Combination Lock - Black https://www.amazon.com/dp/B07T9MC9LC/ref=cm_sw_r_cp_api_glt_fabc_B831WPXNJGG89R7SEC3H