Skip to content

Why does an upload fail when I use the Amazon S3 console to upload a large file?

2 minute read
1

I want to use the Amazon Simple Storage Service (Amazon S3) console to upload a file that’s 1 GB or larger. However, the upload continually fails, and I get timeout errors.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

For large files, Amazon S3 might separate the file into multiple uploads to maximize the upload speed. During these uploads, the Amazon S3 console might time out because the session times out. If you use the Amazon S3 console, then the maximum file size for uploads is 160 GB. To upload a file that's larger than 160 GB, use the AWS CLI or an AWS SDK.

AWS CLI

Configure the AWS CLI with an AWS Identity and Access Management (IAM) user or role that has permissions to access Amazon S3.

To upload a large file, run the following cp command:

aws s3 cp cat.png s3://docexamplebucket

Note: Replace cat.png with your file name and docexamplebucket with your S3 bucket. The file must be in the same directory that you run the command from.

When you run a high-level command such as aws s3 cp, Amazon S3 automatically performs a multipart upload for large objects. In a multipart upload, a large file splits into multiple parts that upload separately to Amazon S3. After all the parts upload, Amazon S3 combines the parts into a single file. A multipart upload can result in faster uploads and lower chances of failure with large files.

For more information about multipart uploads, see How do I use the AWS CLI to upload a large file in multiple parts to Amazon S3?

AWS SDK

To programmatically upload large files, use an AWS SDK such as the AWS SDK for Java. For example operations, see AWS SDK support for multipart upload.

Note: For a full list of AWS SDKs and programming toolkits to develop and manage, see Toolbox.

Related information

Using Amazon S3 in the AWS CLI