S3 in ONTAP Best Practices
S3 in ONTAP Best Practices
Abstract
This technical report describes best practices for using the Amazon Simple Storage Service
(S3) with NetApp® ONTAP® software. We also cover capabilities and configurations for using
ONTAP as an object store with native S3 applications or as a tiering destination for NetApp
FabricPool.
TABLE OF CONTENTS
Overview ...................................................................................................................................................... 4
Requirements .............................................................................................................................................. 5
Platforms .................................................................................................................................................................5
S3 license ................................................................................................................................................................5
Architecture ................................................................................................................................................. 6
Service policy ..........................................................................................................................................................6
Bucket .....................................................................................................................................................................7
Users .......................................................................................................................................................................8
ONTAP CLI............................................................................................................................................................12
ONTAP CLI............................................................................................................................................................17
ONTAP CLI............................................................................................................................................................22
Security ...................................................................................................................................................... 26
Local tier ................................................................................................................................................................26
Requirements ........................................................................................................................................................27
Objects ..................................................................................................................................................................28
Group policies........................................................................................................................................................29
Interoperability .......................................................................................................................................... 32
Contact us ................................................................................................................................................. 34
LIST OF TABLES
Table 1) S3 interoperability...........................................................................................................................................32
LIST OF FIGURES
Figure 1) The core elements of an S3 object storage in ONTAP. ...................................................................................6
Figure 2) FlexGroup volume. ..........................................................................................................................................7
Figure 3) Local cluster tiering. ......................................................................................................................................15
Native S3 applications
An increasing number of customers need ONTAP to support objects using S3. Although well suited for
high-capacity archival workloads, demand for native S3 applications is growing rapidly and includes:
• Analytics
• Artificial intelligence
• Edge-to-core ingest
• Machine learning
Customers can now use familiar manageability tools such as ONTAP System Manager to rapidly
provision high-performance object storage for development and operations in ONTAP, taking advantage
of the ONTAP storage efficiencies and security as they do so.
Beginning in ONTAP 9.12.1, the S3 protocol can also be enabled in multiprotocol NAS volumes that have
been preconfigured to use NAS protocols. When the S3 protocol is enabled in multiprotocol NAS
volumes, client applications can read and write data using S3, NFS, and SMB, which opens up a variety
of additional use cases. One of the most common use cases is NAS clients writing data to a volume and
S3 clients reading the same data and performing specialized tasks such as analytics, business
intelligence, machine learning, and optical character recognition.
FabricPool endpoints
Beginning with in ONTAP 9.8, FabricPool supports tiering to buckets in ONTAP, allowing for ONTAP-to-
ONTAP tiering. This is an excellent option for customers who wish to repurpose existing FAS
infrastructure as an object-store endpoint.
FabricPool supports tiering to ONTAP in two ways:
• Local cluster tiering. Inactive data is tiered to a bucket located on the local cluster using cluster
LIFs.
• Remote cluster tiering. Inactive data is tiered to a bucket located on a remote cluster similarly to a
traditional FabricPool cloud tier using IC LIFs on the FabricPool client and data LIFs on the ONTAP
object store.
NetApp recommends using StorageGRID, the premier NetApp object store solution, when tiering more
than 300TB of inactive data. A FabricPool license is not required when using ONTAP or StorageGRID as
the cloud tier.
Data LIFs
Storage virtual machines (SVMs) hosting object store servers require data LIFs to communicate with
client applications using S3. When configured for remote cluster tiering, FabricPool is the client and the
object store is the server.
Cluster LIFs
When configured for local cluster tiering, a local tier (also known as a storage aggregate in the ONTAP
CLI) is attached to a local bucket. FabricPool uses cluster LIFs for intracluster traffic.
Note: Performance degradation might occur if cluster LIFs resources become saturated. To avoid this,
NetApp recommends using four-node, or greater, clusters when tiering to a local bucket—the
recommended best practice being an HA pair for the local tier and an HA pair for the local bucket.
Tiering to local buckets on single HA pair is not recommended.
S3 license
As with other protocols such as FC, iSCSI, NFS, NVMe_oF, and SMB, S3 requires the installation of a
license before it can be used in ONTAP. The S3 license is a zero-cost license, but it must be installed on
systems upgrading to ONTAP 9.8.
New ONTAP 9.8 systems have the S3 license pre-installed.
The S3 license can be downloaded from the Master License Keys page on the NetApp support site.
Installation
To install the S3 license, run the following command in the ONTAP CLI:
system license add <license_key>
Service policy
Data service policies are assigned to SVMs and provide a collection of network services required by data
LIFs to support client application protocols. For example, data-nfs is used to support NFS traffic, data-
iscsi is used to support iSCSI traffic, and so on.
New in ONTAP 9.8, the data-s3-server service allows data LIFs to support client application traffic using
S3.
Note: In addition to the data-s3-server service, the data-core service should be included in any service
policy to make sure that applications using the LIF work as expected.
Bucket
In ONTAP, the underlying architecture for a bucket is a FlexGroup volume—a single namespace that is
made up of multiple constituent member volumes but is managed as a single volume, as shown in Figure
2. Individual objects in a bucket are allocated to individual member volumes and are not striped across
volumes or nodes. Individual buckets cannot be provisioned smaller than 96GB.
For more information about FlexGroup volumes, see TR-4557: NetApp ONTAP FlexGroup Volumes.
When used by buckets, FlexGroup volumes use elastic sizing, not volume autogrow. FlexGroup volume
maximums are only limited by the physical maximums of the underlying hardware and have been tested
to 20PB and 400 billion files in a 10-node cluster.
ONTAP S3 supports up to 12,000 buckets, although no more than 1,000 buckets should be created on a
single FlexGroup volume.
The Amazon S3 maximum object size is 5TB. ONTAP S3 supports objects up to 16TB. Objects greater
than 5TB might result in interoperability issues for clients that cannot exceed Amazon-defined maximum
object sizes.
Note: Underlying architectural changes between ONTAP 9.7 buckets (one bucket per FlexGroup
volume) and ONTAP 9.8 (multiple buckets per FlexGroup volume) cannot be made in place. Data
must be migrated from preexisting buckets to ONTAP 9.8 buckets to take advantage of the new
architecture.
FlexGroup volumes
The default FlexGroup size is large and provides significant room for expansion in most environments:
• 1.6PB in ONTAP
• 100TB in ONTAP Select
If a cluster does not have enough capacity to provision the default size, the size is reduced by half until it
can be provisioned in the existing environment. For example, in a 300TB environment, a FlexGroup
volume is automatically provisioned at 200TB (1.6PB, 800TB, and 400TB FlexGroup volumes being too
large for the environment).
Buckets
The default bucket size is:
• 800GB in ONTAP
• 200MB in ONTAP Select
To provide capacity for bucket expansion, the total capacity of all buckets on the FlexGroup volume
should be less than 33% of the FlexGroup volume capacity. If this cannot be met, the bucket being
created is automatically provisioned on a newly created FlexGroup volume.
Users
User authorization is required on all ONTAP object stores to restrict connectivity to authorized clients.
Access to specific buckets or S3 actions can be allowed, denied, or made conditional at the user level.
ONTAP S3 supports 4,000 users per object store.
Configure a bucket
To configure a bucket, complete the following steps:
1. Launch ONTAP System Manager.
2. Click Storage.
3. Click Buckets.
4. Click Add.
5. Name the bucket.
6. Select the SVM/object store that the bucket will be assigned to. This should be the same SVM/object
store created earlier.
7. Click Save.
Permissions
Copy access permissions from an existing bucket or create new ones.
Note: Users and groups must be configured before they can be permissioned. See Add Users and
Groups.
To create new permissions, complete the following steps:
1. From the Add Bucket page, scroll down to Permissions and click Add.
2. Set principal users. Options include All users of the SVM (default), All public and anonymous users,
and individual users associated with the SVM.
3. Set effect. Options include Allow (default) and Deny.
4. Set actions.
5. Set resources. bucket-name and bucket-name/* are used by default.
6. Set conditions.
7. Add conditions. Up to 10 conditional statements can be added. Each conditional statement is
composed of a key, an operator, and one or more values.
ONTAP CLI
Although the easiest way to create an object store in ONTAP is by using the ONTAP System Manager,
object stores created using ONTAP System Manager allow for less customization.
For example, ONTAP System Manager automatically selects the local tiers (aggregates) use by a bucket
for storage. Although it uses recommended best practices to do so, for complex environments, the
selected local tiers might not be the same ones an experienced storage administrator would use.
Configuration using the ONTAP CLI is required for custom configurations.
To create an object store, bucket, and permission users using ONTAP CLI, complete the following steps:
1. Create the service policy.
2. Create a data LIF to use S3.
3. Install a CA certificate.
4. Create the object store server.
5. Create the bucket.
6. Create a user.
Install a CA certificate
Using CA certificates creates a trusted relationship between client applications and the ONTAP object
store server. A CA certificate should be installed on ONTAP before using it as an object store that is
accessible to remote clients.
Although ONTAP can generate self-signed certificates, using signed certificates from a third-party
certificate authority is the recommended best practice.
To install a CA certificate using the ONTAP CLI, run the following command:
security certificate install -type server -vserver <name> -type server
Note: FabricPool must resolve this name to all IP addresses used by S3 data LIFs through DNS.
Create a user
User authorization is required on all ONTAP object stores to restrict connectivity to authorized clients.
To view the user’s access and secret key by using the ONTAP CLI, run the following command:
Note: Advanced privilege level is required.
object-store-server user show
Root user
A root user (UID 0) is created by default when the bucket is created. The root user has full access to all
buckets and objects. Do not use the root user for client application access. Additional users must be
created for client access.
The ONTAP administrator must run the object-store-server users regenerate-keys
command to set the access key and secret key for this user.
Beginning with ONTAP 9.11.1, ONTAP S3 supports bucket versioning. Enabling versioning allows for the
creation of multiple versions of an object. Much like Snapshot copies, these objects can be retrieved and
restored, enabling client applications to restore deleted objects or retrieve earlier versions of an object.
To create a bucket using the ONTAP CLI, run the following command:
vserver object-store-server bucket modify
-vserver <name>
-bucket <name>
-versioning-state <disabled|enabled|suspend>
Although installation and use of certificate authority (CA) certificates are recommended best practices,
installation of CA certificates is not required when tiering locally. If you are not using a certificate, HTTP
must be enabled and HTTPS must be disabled.
Create a user
User authorization is required on all ONTAP object stores to restrict connectivity to authorized clients.
Note: All S3 users with valid access and a secret key pair can access all buckets and objects in the
SVM.
To create a user by using the ONTAP CLI, run the following command:
vserver object-store-server user create
-vserver <name>
-user <name>
To view the user’s access and secret key by using the ONTAP CLI, run the following command:
Note: Advanced privilege level is required.
object-store-server user show
User groups
A user can be added to groups that can be associated with policy statements at the object store level or
the bucket level. To create a group policy and add users to it using the ONTAP CLI, run the following
command:
vserver vserver object-store-server group create
-vserver <data svm>
-name <group name>
-users <user1, user2, etc.
-policy <policy name>
Note: Attaching a local bucket to a local tier is a permanent action. A local bucket cannot be unattached
from a local tier after being attached. By using a FabricPool mirror, a different local bucket or
cloud tier can be attached.
Permissions
Copy access permissions from an existing bucket or create new ones.
Note: Users and groups must be configured before they can be permissioned. See Add Users and
Groups.
To create new permissions, complete the following steps:
1. Click Storage.
2. Click Buckets.
3. Select a bucket.
4. Click Edit.
5. Set principal users. Options include All users of the SVM (default), All public and anonymous users,
and individual users associated with the SVM.
6. Set effect. Options include Allow (default) and Deny.
7. Set actions.
8. Set resources. bucket-name and bucket-name/* are used by default. NAS directories/folder paths can
also be used.
9. Set conditions.
10. Add conditions. Up to 10 conditional statements can be added. Each conditional statement is
composed of a key, an operator, and one or more values.
Note: S3 in multiprotocol volumes requires a pre-existing SVM configured to serve NAS data using
data-core, and data-nfs, and/or data-cifs services.
Install CA certificate
Using CA certificates creates a trusted relationship between client applications and the ONTAP object
store server. A CA certificate should be installed on ONTAP before using it as object store that is
accessible to remote clients.
Although ONTAP can generate self-signed certificates, using signed certificates from a third-party
certificate authority is the recommended best practice.
To install a CA certificate using the ONTAP CLI, run the following command:
security certificate install -type server -vserver <name> -type server
Create a bucket
To create a bucket using the ONTAP CLI, run the following command:
vserver object-store-server bucket create
-vserver <name>
-bucket <name>
-type nas
-nas-path <junction_path>
Note: Because S3 in multiprotocol NAS volumes uses pre-existing FlexVol or FlexGroup volumes, a
new FlexGroup volume exclusively for S3 objects is not created. The volume already exists, so
there is no need to define aggregates, constituent volumes, or size.
Note: ONTAP S3 supports object versioning in native S3 buckets. Object versioning is not supported in
multiprotocol NAS volumes. Consider using SnapMirror instead.
To view the user’s access and secret key by using the ONTAP CLI, run the following command:
Note: Advanced privilege level is required.
object-store-server user show
Expiration
To create a bucket expiration rule using the ONTAP CLI, run the following command:
vserver object-store-server bucket lifecycle-management-rule create
-vserver <name>
-bucket <name>
-rule-id <name>
-index <#>
-is-enabled <true|false>
-action Expiration
-obj-age-days <#>
-obj-exp-date <"MM/DD/YYYY HH:MM:SS">
-expired-obj-del-marker <true|false>
-prefix <name>
-tags <name, name> (maximum of 4)
-obj-size-greater-than <#[KB|MB|GB|TB|PB]>
-obj-size-less-than <#[KB|MB|GB|TB|PB]>
Examples
Expire objects starting with ‘test’ after 30 days
vserver object-store-server bucket lifecycle-management-rule create
-vserver svm1
-bucket mybucket
-rule-id rule1
-index 1
-is-enabled true
-action Expiration
-prefix testobj
-obj-age-days 30
Examples
Expire non-current versions of objects after 30 days, retaining up to 10 non-current versions
vserver server object-store-server bucket lifecycle-management-rule create
-vserver svm1
-bucket mybucket
-rule-id rule4
-index 4
-action NoncurrentVersionExpiration
-is-enabled true
-non-curr-days 30
-new-non-curr-versions 10
Security
Local tier
NetApp Storage Encryption (NSE), NetApp Volume Encryption (NVE), and NetApp Aggregate Encryption
(NAE) work equally well for objects written to buckets in ONTAP. Neither NSE, NVE, nor NAE are
required for S3 in ONTAP.
Signature Version 4
Prior to ONTAP 9.11.1, S3 in ONTAP did not support Signature Version 2 (v2 signatures) and required
the use of v4 signatures.
Note: Prior to ONTAP 9.11.1, using v2 signatures results in a failure to connect. It is important to be
aware of this because many client applications, including commonly used S3 browsers, use v2
signatures by default. NetApp recommends that client applications use v4 signatures when
possible.
S3 SnapMirror
Beginning with ONTAP 9.10.1, data in ONTAP S3 buckets can be protected by S3 SnapMirror.
SnapMirror allows you to define synchronization schedules to meet specific recovery point objectives
(RPOs). SnapMirror can also be used to create a variety of data protection relationships including source-
to-destination, fan-out, and cascading. Fan-in relationships are not supported.
S3 SnapMirror has two primary use cases:
• Backup and recovery, where the objective is to restore from the destination bucket to the source
bucket with no intention of failing over to the destination bucket. If the S3 SnapMirror relationship is
broken, objects in the destination bucket remain read-only.
• Disaster recovery (DR) and failover, where the objective is to be able to serve data to client
applications from the destination bucket in the event a disaster event takes place. If the S3
SnapMirror relationship is broken, the destination bucket supports reads and writes. ONTAP is the
only destination target that supports DR and failover operations.
Snapshot copies
Although ONTAP S3 supports object versioning, because object storage is not transactional like file or
block storage, S3 SnapMirror does not make use of Snapshot copies that capture the state of a file at a
specific point in time and act as highly efficient point-in-time deltas.
Requirements
S3 SnapMirror requires ONTAP 9.10.1 or later. Prior to ONTAP 9.10.1, data protection could be achieved
by using NetApp Cloud Sync.
Destination targets
• NetApp:
− ONTAP
− StorageGRID
− Cloud Volumes ONTAP for AWS
− Cloud Volumes ONTAP for Azure
− Amazon FSx for NetApp ONTAP
• Third party:
− Amazon S3
Note: When using ONTAP as a destination target, S3 SnapMirror supports creating a data
protection relationship between source and destination buckets in both same- and remote-
cluster relationships. Same-cluster relationships do not protect data from cluster or site-wide
disaster events. NetApp recommends using S3 SnapMirror with destination targets outside
the local cluster.
License
Enabling S3 SnapMirror requires the use of the Data Protection Bundle. Both the Data Protection Bundle
and the Hybrid Cloud Bundle are required when using S3 SnapMirror to replicate data to third-party object
stores such as Amazon S3.
Protection policies
S3 SnapMirror creates a data protection relationship that replicates data in a source bucket to a
destination bucket. Replication of data is based on the protection policy selected when a bucket is
protected. The S3 SnapMirror default protection policy, Continuous, replicates data continuously to the
destination bucket, using a one-hour RPO, and does not throttle data.
Protection policies can be created and saved for use when protecting one or more buckets. Customizable
parameters include the following:
• Policy type. S3 SnapMirror protection policies must use the Continuous policy type. Asynchronous
and Synchronous policies can be created using the Add Protection Policy menu but cannot be
selected as a protection policy when protecting a bucket.
• Throttle. Set the maximum bandwidth allowed to attain the RPO. The default of zero does not set
any throttle.
• RPO. Set a delay between the time a change is made in the source bucket and when that change is
pushed to the destination bucket. The default is one hour.
Supported S3 actions
Buckets
Actions marked with an asterisk are supported by ONTAP but not by S3 REST APIs.
• CreateBucket (9.11.1)
• DeleteBucket (9.11.1)
• DeleteBucketLifecycleConfiguration (9.13.1)
• DeleteBucketPolicy (9.12.1)
• GetBucketAcl
• GetBucketLifecycleConfiguration (9.13.1)
• GetBucketLocation (9.10.1)
• GetBucketPolicy (9.12.1)
• GetBucketVersioning (9.11.1)
• HeadBucket
• ListBuckets
• ListBucketVersioning (9.11.1)
• PutBucket*
• PutBucketLifecycleConfiguration (9.13.1)
• PutBucketPolicy (9.12.1)
• PutBucketVersioning (9.11.1)
Objects
• AbortMultipartUpload
• CompleteMultipartUpload
Group policies
These operations are not specific to S3 and are generally associated with Identity and Management
(IAM). ONTAP supports these commands but does not use the IAM REST APIs.
ONTAP S3 groups can have a maximum of 10 attached policies. Group policies can have a maximum of
five statements. Each statement can have a maximum of 10 resources.
• Create Policy
• AttachGroup Policy
User management
These operations are not specific to S3 and are generally associated with IAM:
• CreateUser
• DeleteUser
• CreateGroup
• DeleteGroup
S3 actions by release
ONTAP 9.13.1
ONTAP 9.13.1 adds bucket lifecycle configuration.
• DeleteBucketLifecycleConfiguration
• GetBucketLifecycleConfiguration
• PutBucketLifecycleConfiguration
ONTAP 9.12.1
ONTAP 9.12.1 adds bucket policies and the ability to copy objects.
• DeleteBucketPolicy
• GetBucketPolicy
• PutBucketPolicy
• CopyObject
• UploadPartCopy
ONTAP 9.11.1
ONTAP 9.11.1 adds versioning, presigned URLs, chunked uploads, and support for common S3 actions
such as creating and deleting buckets using S3 APIs.
• ONTAP S3 now supports chunked uploads signing requests using x-amz-content-sha256:
STREAMING-AWS4-HMAC-SHA256-PAYLOAD
• ONTAP S3 now supports client applications using presigned URLs to share objects or allow other
users to upload objects without requiring user credentials.
• CreateBucket
• DeleteBucket
• GetBucketVersioning
• ListBucketVersioning
• PutBucketVersioning
• DeleteObjects
• ListObjectVersions
Note: Because the underlying FlexGroup is not created until the first bucket is, a bucket must first
be created in ONTAP before an external client can create a bucket using CreateBucket.
ONTAP 9.9.1
ONTAP 9.9.1 adds object metadata and tagging support to ONTAP S3.
• PutObject and CreateMultipartUpload now include key-value pairs using x-amz-meta-<key>. For
example: x-amz-meta-project: ontap_s3.
• GetObject, and HeadObject now return user-defined metadata.
• Tags can also be used with buckets. Unlike metadata, tags can be read independently of objects
using:
• PutObjectTagging
• GetObjectTagging
• DeleteObjectTagging
Table 1) S3 interoperability.
Focus Supported Not supported
Data protection • Cloud Sync • Erasure coding
• S3 SnapMirror (9.10.1) • Mirrored NetApp MetroCluster
• Unmirrored NetApp aggregates
MetroCluster™ aggregates • NDMP
(9.12.1) • NetApp SnapLock® technology
• NetApp SnapMirror® technology
• NetApp SyncMirror® technology
• SMTape
• SVM-DR
• WORM
Encryption • NetApp Aggregate Encryption • SLAG
(NAE)
• NetApp Storage Encryption
(NSE)
• NetApp Volume Encryption
(NVE)
• TLS/SSL
Storage efficiency • Compaction • Aggregate-level efficiencies
• Compression
• Deduplication
• Temperature Sensitive Storage
Efficiency (TSSE)
Storage virtualization – • NetApp FlexArray® technology
QoS • QoS maximums (ceiling) –
• QoS minimums (floors)
Additional features • Audit • FabricPool cloud tier (NAS volumes
• Bucket Lifecycle Management only)
(9.13.1) • FabricPool local tier (native S3 only)
• FabricPool cloud tier (native S3 • NetApp FPolicy software
only) • Qtrees
• FabricPool local tier (NAS • Quotas
volumes only)
Contact us
Let us know how we can improve this technical report.
Contact us at [email protected].
Include TR-4814: S3 in ONTAP best practices in the subject line.