October 19th, 2024

Using S3 presigned upload URLs with Hetzners's new object storage

Hetzner has launched S3-compatible object storage, requiring users to configure a CORS policy for presigned URL uploads. Launchway offers a SaaS starter kit with S3-compatible storage features.

Read original articleLink Icon
Using S3 presigned upload URLs with Hetzners's new object storage

Hetzner has introduced S3-compatible object storage, allowing users to utilize familiar AWS SDKs without vendor lock-in. However, to enable direct uploads via presigned URLs, users must configure a CORS policy for their buckets, as the default settings block such uploads. The process begins with creating a bucket and obtaining the access and secret keys. Users can set up the AWS CLI with these credentials to interact with their Hetzner bucket. The CORS policy can be defined in JSON format, specifying allowed origins, methods, headers, and other parameters. Once the policy is created, it can be applied using the AWS CLI command to set the bucket's CORS configuration. This setup allows web applications to upload files directly to the Hetzner object storage, streamlining the process and reducing server load. Launchway offers a SaaS starter kit that includes S3-compatible storage along with various features for building applications.

- Hetzner's S3-compatible storage allows use of AWS SDKs without vendor lock-in.

- Users must configure a CORS policy to enable presigned URL uploads.

- The CORS policy is defined in JSON format and specifies allowed origins and methods.

- The AWS CLI can be used to apply the CORS policy to the Hetzner bucket.

- Launchway provides a SaaS starter kit that includes S3-compatible storage and additional features.

Link Icon 0 comments