Middle+
What is S3?
sobes.tech AI
Answer from AI
S3 (Simple Storage Service) is a cloud storage service provided by Amazon Web Services (AWS). It allows storing and retrieving any amount of data on the internet with high availability and reliability.
Main features of S3:
- Object storage: data is stored as objects within buckets.
- Scalability: can store from gigabytes to petabytes of data.
- Security: supports encryption, access control.
- Integration with other AWS services.
Example of usage in Java with AWS SDK:
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.PutObjectRequest;
import java.nio.file.Paths;
public class S3Example {
public static void main(String[] args) {
S3Client s3 = S3Client.create();
s3.putObject(PutObjectRequest.builder()
.bucket("my-bucket")
.key("example.txt")
.build(),
Paths.get("/path/to/local/file.txt"));
}
}
Thus, S3 is a convenient and reliable way to store files and data in the cloud.