“Error: cannot perform operations on a shutdown bucket"

Are you using a connection that you closed or did not keep a reference too? E.g. You created it in a function scope but are trying to access it at a global scope or in a different function scope? That’s the error I always get if I try to use a connection I already closed by calling disconnect().