Amazon File Cache is a new service that provides a high speed cache on AWS,
making it easier to process file data regardless of where the data is stored.
Amazon File Cache serves as a temporary high performance
storage location for data stored in on premises
file systems.
AWS file systems
and Amazon S3 buckets, enabling customers to make dispersed data sets
available to file based applications on AWS with a unified view.
Amazon File Cache delivers consistent sub millisecond latency,
up to hundreds of gigabytes per second of throughput
and up to millions of operations per second,
helping you speed up workload completion times and optimize compute utilization.
In this demo, we'll look at how to get started with Amazon File Cache.
First, we head to the Amazon File Cache homepage,
click "Getting started with Amazon File Cache"
and then "create cache".
We'll call it "media-cache" and give it a size of 9.6 TB bites
File Cache also provisions an additional 2.4 TB
bites of metadata storage for each cache.
The throughput is automatically calculated based
on the configured storage capacity,
which determines the maximum rate
we can continuously write to or read from the cache.
This throughput is shared between clients accessing the cache
and data movement between the cache and data repositories.
We will provide network access to the cache by selecting "demo-vpc" as our VPC
and an existing security group that allows traffic
to flow through the required ports between File Cache
and our compute instances that will be reading from it.
We'll also use the default subnet.
Encryption is automatically enabled and we can encrypt
the data using the default KMS encryption key
or we can opt to use a predefined key such as a Customer Managed Key by entering the ARN.
Let's use the default key.
After providing some tags on our new resource, we click "next".
Up to eight existing data repositories can be associated to a cache
and we can choose between NFS and S3 as the repository type.
Let's create a cache that points to several NFS data repositories.
First, we select NFS as the repository type and provide the data repository path.
Since we're linking the cache to a single directory on this NFS file system,
we will also specify the directory along with a domain name
and leave the subdirectories field empty.
The DNS server IP addresses allow file cache
to resolve the domain name of the NFS server,
which is useful when DNS resolution is private.
Since we're associating NFS V3 servers deployed in an Amazon VPC
and using the AWS provided DNS server,
we use the reserved DNS server IP address which corresponds
to the base of our VPC network cider range plus two,
which in our case
is 10.0.0.2.
Next, we name the path "photos" according to its content and click "add",
Then, we repeat the same process for our 2nd file server.
When finished,
we click "next" to see a summary of our desired configuration.
Finally, we click "create cache"
and wait for the cache to be created.
As we can see in the details page, our new cache is now available
and the two data repositories have been successfully associated.
We can get instructions on how to mount the new cache by clicking "attach"
and then copying the mounting command.
Using an existing EC2 instance, which is configured with the
adequate security group to allow traffic to our new cache,
we execute that command in the terminal.
Now that the cache has been mounted,
we can access its content from the EC2 instance.
In the first part of this demo we saw how to
create a cache that points to NFS data repositories.
Let's now look at how to create a cache pointing
to several S3 buckets containing photos and videos.
First, we head back to the file cache home page and click on "create cache".
We'll use similar values as we did previously for the storage capacity,
network security and encryption settings,
and then click on "next".
This time
we select amazon S3 as a repository type,
provide the S3 bucket name
and specify photos for the cache path.
After clicking "add"
we will quickly create another data repository for the video
files by providing the S3 bucket name,
entering videos for the path
and then clicking "add".
Now, we click "create cache" and wait for the cache to become available.
Now that the second cache is available,
we'll test it the same way we tested the previous one by copying the MOUNT command
and running it on our EC2 instance.
And with that, we now have access to its content.
To learn more about how to get started with Amazon File Cache,
please visit the link shown below.