There are more AWS SDK examples available in the AWS Doc SDK Examples
Code examples for Amazon S3 using AWS SDKs
The following code examples show how to use Amazon Simple Storage Service (Amazon S3) with an AWS software development kit (SDK).
Get started
The following code examples show how to get started using Amazon S3.
Code examples
- Actions
- Add CORS rules to a bucket
- Add a lifecycle configuration to a bucket
- Add a policy to a bucket
- Cancel multipart uploads
- Complete a multipart upload
- Copy an object from one bucket to another
- Create a bucket
- Create a multipart upload
- Delete CORS rules from a bucket
- Delete a policy from a bucket
- Delete an empty bucket
- Delete an object
- Delete multiple objects
- Delete the lifecycle configuration of a bucket
- Delete the website configuration from a bucket
- Determine the existence and content type of an object
- Determine the existence of a bucket
- Download objects to a local directory
- Enable logging
- Enable notifications
- Enable transfer acceleration
- Get CORS rules for a bucket
- Get an object from a bucket
- Get an object from a bucket if it has been modified
- Get the ACL of a bucket
- Get the ACL of an object
- Get the Region location for a bucket
- Get the lifecycle configuration of a bucket
- Get the policy for a bucket
- Get the website configuration for a bucket
- List buckets
- List in-progress multipart uploads
- List object versions in a bucket
- List objects in a bucket
- Restore an archived copy of an object
- Set a new ACL for a bucket
- Set the ACL of an object
- Set the website configuration for a bucket
- Upload a single part of a multipart upload
- Upload an object to a bucket
- Upload directory to a bucket
- Scenarios
- Create a presigned URL
- Create a web page that lists Amazon S3 objects
- Get started with buckets and objects
- Get started with encryption
- Get started with tags
- Manage access control lists (ACLs)
- Manage versioned objects in batches with a Lambda function
- Parse URIs
- Perform a multipart copy
- Upload or download large files
- Work with versioned objects
- Cross-service examples
- Build an Amazon Transcribe app
- Convert text to speech and back to text
- Create a serverless application to manage photos
- Create an Amazon Textract explorer application
- Detect PPE in images
- Detect entities in text extracted from an image
- Detect faces in an image
- Detect objects in images
- Detect people and objects in a video
- Save EXIF and other image information