Tencent Cloud File Storage (CFS) provides a scalable shared file storage service that can be used with various Tencent Cloud services such as CVM, TKE, and batch operations. The standard NFS file system access protocol used by CFS offers shared data sources for multiple computing nodes. It supports elastic capacity and performance scaling. Your existing applications can be mounted for use without modification required. As a highly available and reliable distributed file system, CFS is suitable for various scenarios such as big data analysis, media processing, and content management.
CFS is very cost-effective and pay-as-you-go on an hourly basis, so you only need to pay for the actually used storage space. For more information on CFS billing, see Billing Overview.
Tencent Cloud SCF can be seamlessly integrated with CFS. After proper configuration, your functions can easily access files stored in CFS. You can enjoy the following advantages of CFS:
Note:To use the CFS service, SCF needs permission to operate on your CFS resources.
Follow the steps below to grant the permission to your account:
SCF_QcsRole
role with the QcloudCFSReadOnlyAccess
policy as instructed in Modifying a Role. The result of a successful association is shown below:QcloudCFSReadOnlyAccess
policy as instructed in Setting Sub-user Permissions. The result of a successful association is shown below:Build a VPC as instructed in Building Up an IPv4 VPC.
Create a CFS file system as instructed in Creating File Systems and Mount Targets.
Note:Currently, SCF allows only CFS file systems whose network type is VPC to be added as mount targets. When creating a CFS file system, select the same VPC as that of the target function to enable communication.
chown 10000:10000 -R /mnt/folder
command. For more information, see Managing Permissions./mnt/
directory to mount the CFS file system.'use strict';
var fs = require('fs');
exports.main_handler = async (event, context) => {
await fs.promises.writeFile('/mnt/myfolder/filel.txt', JSON.stringify(event));
return event;
};
You can use this Demo to test how well CFS performs on SCF.
Was this page helpful?