update s3 attach/detach logic for GMS gateways