Appearance
Best Practices ​
Object Access ​
S3 Storage supports two ways of URLs to access objects in a Bucket.
| Access Style | Example | Use Case |
|---|---|---|
| Path-style URL | https://ds12s3.swissscom.com /MYBUCKET/MYOBJECT | The Bucket is set after the URL as a suffix. |
| Namespace-style URL | https://MYNAMESPACE.ds12s3ns.swisscom.com /MYBUCKET/MYOBJECT | Only used in rare cases. For static objects like an HTML page, namespace-style can be used to access the objects. |
| Virtual host-style URL | https://MYBUCKET.ds12s3.swisscom.com /MYOBJECT | The Bucket is part of the URL and set as a prefix. |
ds12s3.swisscom.com vs. ds12s3ns.swisscom.com
- In most use cases, ds12s3.swisscom.com is the preferred way to access the Object Storage S3 service.
- ds12s3ns.swisscom.com is normally only used for static webpages, where unauthenticated access is required.
- For a basic example with the S3 Browser application, please follow this link
Private vs. Public (Internet) Access ​
- Private: Data is only accessible within the customer network via ds12s3.swisscom.com or ds12s3ns.swisscom.com.
- Public: Data is accessible via ds12s3.swisscom.com or ds12s3ns.swisscom.com and from the internet via ds11s3.swisscom.com or ds11s3ns.swisscom.com.
- Be extremely careful when exposing your data to the internet.
- When creating an S3 Account, by default, the internet accessible flag is not enabled. For security reasons, we disabled the possibility to modify this flag after the creation of the S3 Account, even with a service ticket, as with the chosen design internet accessible S3 services have a different setup.
If the access is set incorrectly by mistake, you have the following options:
If there is no data:
- Delete existing users and S3 service.
- Create a new S3 service with the appropriate access.
If there is already data:
- Create an additional user.
- Delete the existing users (if the credentials are too widely spread).
- Create a new S3 service with the appropriate access.
- Copy the data via the S3 Tool of your choice to the new S3 service
(There is no Swisscom provided copy service available at this point). - Delete the data in the old S3 service.
- Delete the old S3 user and the old S3 service.
Disable Option for Public S3 Accounts
The option to create S3 Accounts that are public (internet accessible) can be disabled for your tenant. If you wish this option to be disabled, please contact us via service request.
Naming Conventions ​
Bucket Name ​
The following rules apply to the naming of S3 buckets in ECS:
- Bucket Name must be between 3 and 63 characters.
- Bucket name must contain only alphanumeric lowercase characters and dashes (follows DNS rules).
The name does not support:
- Starting with a dot (.)
- Containing a double dot (..)
- Ending with a dot (.)
- Names formatted as IPv4 addresses.
Object Name ​
The following rules apply to the naming of ECS S3 objects:
- Cannot be null or an empty string.
- Length range is 1..255 (Unicode char).
- No validation on characters!
Advanced Features and Settings ​
S3 Features ​
Supported S3 features can be found here
Archive Safe ​
Archive Safe is a WORM feature which can be set on an S3 Bucket. This is not AWS standard but a feature from Dell ECS. When an S3 Account with Archive Safe is created, new buckets with any desired retention period can be created by Swisscom into that account. To achieve this, simply create a ticket to Swisscom stating the S3 Account (ID or Namespace ID), the desired bucket name, and the desired retention period.
Important
All buckets created with any other application won't have a retention period configured.
With this simple functionality, the S3 backend won't allow objects to be overwritten or deleted for the desired period. To check the remaining retention period of a bucket, it can be found in the header "x-emc-retention-period" from the bucket.
Additional Information
Not all S3 applications will be able to function with that feature in place, for example, if they require overwriting or deleting an object and the S3 backend doesn't allow it. For such applications, S3 Object Lock could be an option (see below).
S3 Object Lock ​
With S3 Object Lock, objects can be stored in a WORM (write-once-read-many) model. Objects can be prevented from being overwritten or deleted for a fixed amount of time. All S3 Services can use ObjectLock. Object Lock can either be applied per Object or on Bucket level (global for the whole Bucket). The usage is the same as described for the AWS S3 API.
Additional Information
Due to a staged rollout, at the moment only newly created S3 Services will be able to use Object Lock.
Governance Mode
Only the GOVERNANCE mode can be used. All usage of the COMPLIANCE mode will be blocked. Additionally, a retention period for an object can only be increased and never be decreased, so please be aware of that when setting a long retention period on objects/buckets.
Automatic Cleanup of Expired Object Versions ​
As S3 Object Lock will always generate new versions of a file, preserving the versions for a fixed amount of time, it can be beneficial to create a lifecycle policy that removes Object Versions after the retention period is over. Let's say there is a Bucket-Wide Object Lock Policy which will prevent the deletion of objects for 30 days. Then, it can be advantageous to create a policy to clean up all noncurrent versions after 31 days automatically (but not touch the active versions). This can be achieved with the following Retention Policy:
(Please note that an automatic cleanup policy for incompleted MPUs is also included, which we strongly recommend (see below))
json
{
"Rules": [
{
"ID": "CleanupNonCurrentVersionsAndMPU",
"Status": "Enabled",
"Filter": {
"Prefix": ""
},
"AbortIncompleteMultipartUpload": {
"DaysAfterInitiation": 7
},
"Expiration": {
"ExpiredObjectDeleteMarker": true
},
"NoncurrentVersionExpiration": {
"NoncurrentDays": 31
}
}
]
}S3 Account vs S3 User ​
- By Amazon IAM design, data is owned by the S3 service (namespace) and not the S3 user.
- All S3 users within an S3 Account are able to access the same data. If this is not desired, a new S3 Account needs to be created.
Advanced IAM Rules ​
To simplify the user experience, only a subset of the IAM possibilities are currently supported. In case of special requirements, please get in touch with us via the normal support process.
ACL on Buckets ​
We do not recommend protecting objects with ACLs on the object or bucket level. We recommend using the predefined user roles of read/write or read-only.
Bucket Policies ​
There are many ways to restrict access to buckets further. If a concept with many users is planned and restrictions for single users on buckets should be applied, a special notation method must be used.
For the policy creation, you need:
Namespace ID
You find the namespace ID in the portal in the "Overview" tab of your S3 Account:

IAM User ID
You find the User ID in the portal in the "Users" tab of your S3 Account (select the desired user and click on the small Arrow):


To tailor a more complex bucket policy with a user restriction, the following notation is needed:
urn:ecs:iam::<span class="namespace">Namespace ID</span>:user/<span class="user">IAM User ID</span>
Below, a very simple example of such a bucket policy is displayed:
- On
[Bucket Name], all access from any other User is blocked ("NotPrincipal"). - On
[Bucket Name], only access from the specific user is allowed ("Principal").
json
{
"Version": "2012-10-17",
"Id": "S3PolicyId",
"Statement": [
{
"Action": [
"s3:*"
],
"Resource": [
"[Bucket Name]/*",
"[Bucket Name]"
],
"Effect": "Deny",
"NotPrincipal": {
"AWS": "urn:ecs:iam::[Namespace ID]:user/[IAM User ID]"
},
"Sid": "denyAllOtherUsers"
},
{
"Action": [
"s3:*"
],
"Resource": [
"[Bucket Name]/*",
"[Bucket Name]"
],
"Effect": "Allow",
"Principal": {
"AWS": "urn:ecs:iam::[Namespace ID]:user/[IAM User ID]"
},
"Sid": "allowUser"
}
]
}Data Encryption ​
During Transit ​
Data is always encrypted during transit (HTTPS).
At Rest ​
By default, data is not encrypted at rest on your S3 service. With the "Encryption Enabled" option, it is possible to enable encryption for the entire S3 Account (Namespace-Level).
If encryption at rest is desired on tenant level for new Object Storage S3 deployments, please open a service request. This option will enforce encryption on new S3 Accounts by default, and the user does not have to explicitly set the corresponding parameter.
Encryption Changes Not Possible
Encryption cannot be changed after your account has been created.
Advanced Encryption Possibilities ​
If you need more fine-grained data encryption (e.g., at bucket level), there are several possibilities:
- Encryption/decryption on the client for the upload/download to the Object Storage S3 service. This provides the highest possible security as the encryption is fully in your hands and no keys are stored within the system.
- Using server-side encryption with customer-provided encryption key. The encryption for each request is done at the S3 system with some performance impact. If you lose the encryption key, the data is lost. Neither Swisscom nor the system vendor can retrieve the key.
- Using server-side encryption with system-generated encryption key. This method only protects your data from an extremely unlikely event of disk theft. Even if this happens and disks are stolen in a datacenter, it's close to impossible to access your data as the objects are stored in fragments and distributed over many different disks. This doesn't protect the data from access key theft.
Not all S3 clients support server-side encryption.
Multipart Upload (MPU) ​
Nearly all tools to access data provide a function to upload large objects as a multipart upload. With this procedure, the file is split into multiple parts and all of them can be uploaded in multiple parallel streams. This increases performance significantly.
We recommend using a part size of 8MiB.
Incomplete Multipart Uploads ​
In case a MPU is aborted (for any reason), there will be an incomplete multipart upload. By default, these incomplete MPUs are not cleaned up by the system. As long as there are incomplete MPUs remaining, a bucket cannot be deleted. A lifecycle policy can be implemented to automatically clean up incomplete MPUs after a certain time. Here is the basic policy (will delete all incomplete MPUs after 1 day):
json
{
"Rules": [
{
"ID": "CleanupIncompletedMPU",
"Status": "Enabled",
"Filter": {
"Prefix": ""
},
"AbortIncompleteMultipartUpload": {
"DaysAfterInitiation": 7
}
}
]
}Example: How to Check for Incomplete MPUs with MinIO Client
sh
$ mc ls <my-alias>/<my-bucket-name> -IAs long as there are incompleted MPUs listed here the bucket cannot be deleted.
Example how to set up automatic MPU cleanup with MinIO client
Add new Policy to a json file (in this example mypolicy.json):
Set Bucket Policy:
sh$ mc ilm import <my-alias>/<my-bucket-name> < mypolicy.json Lifecycle configuration imported successfully to `<my-alias>/<my-bucket-name>`.Check Bucket Policy:
sh$ mc ilm ls <my-alias>/<my-bucket-name>text| ID | Prefix | Enabled | Expiry | Date/Days | Transition | Date/Days | Storage-Class | Tags | |-----------------------|--------|---------|--------|-----------|------------|-----------|---------------|------| | CleanupIncompletedMPU | | ✓ | ✗ | | ✗ | | | |(Optional) Get Bucket Policy to local json file:
sh$ mc ilm export <my-alias>/<my-bucket-name> > mypolicy.json(Optional) Remove Bucket Policy:
sh$ mc ilm rm --id "CleanupIncompletedMPU" <my-alias>/<my-bucket-name> Rule ID `CleanupIncompletedMPU` from target <my-alias>/<my-bucket-name> removed.
