Vairamani S
Vairamani S

Reputation: 11

I want to write a text file into s3 bucket using java through putobjectrequest

I want to create/write a text file into s3 bucket using java.i'm using file output stream writer to write a content.

Upvotes: 0

Views: 5297

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269540

Take a look at the Amazon S3 client putObject() function that includes an InputStream:

public PutObjectResult putObject(String bucketName,
                                 String key,
                                 InputStream input,
                                 ObjectMetadata metadata)
                          throws SdkClientException,
                                 AmazonServiceException

Upvotes: 2

Related Questions