You cannot enforce a range on content length. The way you limit the file size is by allowing the client to specify the desired length when requesting the presigned URL, and if the desired length is unacceptable, you just don't give them the presigned URL but error out instead. If acceptable, then you create the presigned URL with "ContentLength": desired_length
as a parameter instead.