Skip to content

is there any restriction with cloudfront while uploading file to the s3 and ec2 instance?

0

I have website hosting on s3 as frontend and ec2 as backend api. In that website there is functionality where user can upload profile picture. in that case user is able to upload image less then 5 kb but not able to upload more then that. how user can upload large file.

  • What is the error message when a large upload fails?

2 Answers
0

You can leverage the multipart upload feature of S3 to allow users to upload large files as profile pictures on your website. Please see this as reference https://aws.amazon.com/blogs/compute/uploading-large-objects-to-amazon-s3-using-multipart-upload-and-transfer-acceleration/ You can split the large file into chunks of 5-10 MB, and upload each chunk using multipart upload API. At the end of all part upload, complete the multipart upload by combining the parts into a single object in S3.

AWS
EXPERT

answered 2 years ago

  • I am not able to upload file more then 5 KB. I have CloudFront distribution in front of s3 bucket(website). Have integrated WAF as well with CloudFront.

0

Hello,

Regarding the file size limits through Amazon CloudFront,

The maximum size of a single file that can be delivered through Amazon CloudFront is 30 GB. This limit applies to all Amazon CloudFront distributions.

and for S3 bucket,

Individual Amazon S3 objects can range in size from a minimum of 0 bytes to a maximum of 5 TB. The largest object that can be uploaded in a single PUT is 5 GB. For objects larger than 100 MB, customers should consider using the multipart upload capability.

EXPERT

answered 2 years ago

  • I am not able to upload file more then 5 KB. I have CloudFront distribution in front of s3 bucket(website). Have integrated WAF as well with CloudFront.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.