S3 as primary via putty

I have nextcloud installed on an EC2 instance and want to use S3 as primary storage.

From what I understand, I need to add the lines found here, to the main config.php file:

How would I do that please using putty?

I am a linux absolute beginner and managed to do the initial install with some step-by-step found on the web+ snap.

Any advice appreciated.

Many thanks,