AWS Lambda for uploading file to S3

0

Hi, is there any way possible for an AWS Lambda function written in Java to upload a file in different formats to an Amazon S3 bucket? The AWS Lambda function only takes JSON as input, so I am not seeing a way to do this unless the file is kept on some other type of storage in AWS. Then, I can just pass the filename as input to the Lambda function and the lambda function can get the file from this other type of storage and upload it to an S3 bucket. Any recommendation on what other type of storage I can use to get the file? Thanks a lot.

3개 답변
0

Hi, How are you receiving the files? Are these static files or files are changing?

Perhaps you could use ephemeral storage in lambda https://aws.amazon.com/blogs/aws/aws-lambda-now-supports-up-to-10-gb-ephemeral-storage/ This will allow you to save files in the lambda function in a directory called

/tmp

that you can access inside the lambda.

AWS
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
0

I would go for having an API gateway where a lambda just would generate a signed url.

Then the client will PUT the file by using the url.

https://aws.amazon.com/blogs/compute/patterns-for-building-an-api-to-upload-files-to-amazon-s3/

profile picture
전문가
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
0

You can insert any file format in to s3. If I understand your question correctly then you are trying to upload file received from another s3. In that case once object create you can get your lambda triggered read stream and write stream into another s3

Sushant
답변함 한 달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠