How to restore a deleted S3 object with versioning enabled

Two questions.

  1. I am trying to restore a deleted object from an S3 bucket after aws sync. It has versioning enabled. what are the steps to restore it so I can download it. but I am not trying to make the version default.
  2. how do you get the size of the AWS s3 object which is already deleted but is set with DELETEMARKER.

aws s3api get-object --version-id .....

and get the version-id from the console.
https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html

If you so not have access to AWS Management console then use

aws s3api list-object-versions --bucket ...

Thanks. I am trying to restore multiple objects(stating delete marker) at once on a particular date that I have deleted. Is that possible from aws CLI ?

Should be possible, have not tried it myself.

Or you can write a small script