Step 1. Prepare COS Bucket

Last updated: 2021-07-22 10:42:28

  1. The source and target buckets must be in the same region as the function. In this tutorial, the Guangzhou region is used.
  2. Two COS buckets must be used. If you use the same bucket as both source and target buckets, each thumbnail uploaded to the source bucket may trigger the function again and thus generate unnecessary recursion.
  1. Log in to the Tencent Cloud Console and select Cloud Object Storage.
  2. Click Create Bucket in the Bucket List tab to create a source COS bucket.
  3. Set the name of the COS bucket as mybucket1, select Guangzhou as the region, set the access permission to the default value of private read and write, and click OK.
  4. Create the target bucket mybucket-resized in the same way.