I am using AWS PHP SDK. I uploaded a JSON file to S3 bucket. Now I would like to get the file contents(uploaded to S3 bucket), add some additional text to the grabbed file contents and update that file over the S3 bucket.
What I want is something like this:
- file name:
- grab content of file using S3 provide methods
- eg: existing file contents are
- add additional contents
- update newly added content into S3 bucket file (
How we can do this ?
You can’t add data to, or modify just part of an existing s3 object, you need to read the object, make changes to the object, and the write the entire object back to s3.