0

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

Vairamani S
  • 11
  • 1
  • 1
  • I see this is your first Question on Stack Overflow, welcome! Please provide some code so we can see what you have tried and better understand the context of your question, which in turn will help us out to help you. Also see [How To ask](http://stackoverflow.com/help/how-to-ask) on how to ask better question which lead to better answers. – Raymond Jan 23 '17 at 16:17
  • Possible duplicate of [AmazonS3 putObject with InputStream length example](http://stackoverflow.com/questions/8351886/amazons3-putobject-with-inputstream-length-example) – Prasad Khode Jan 24 '17 at 07:26

1 Answers1

2

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
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470