This topic describes how to create an Object Storage Service (OSS) event trigger in the Function Compute console.


  1. Create service
  2. Create function
  3. Create buckets
    Note The OSS bucket and your function must be in the same region.

Create a trigger

  1. Log on to the Function Compute console.
  2. In the top navigation bar, select a region.
  3. In the left-side navigation pane, click Services and Functions.
  4. In the Services pane, click the service that you require. On the Functions tab, click the name of the function that you require.
  5. Click the Triggers tab. Then, click Create Trigger.
  6. In the Create Trigger panel, enter the relevant information. Then, click OK.
    Parameter Description
    Trigger Type Select Object Storage Service (OSS).
    Trigger Name Enter a name for the custom trigger.
    Version/Alias Enter a version or an alias for the trigger. Default value: LATEST. For more information, see Introduction to versions.
    Bucket Select the created OSS bucket.
    Events Select an event. For more information, see Definition of OSS events.

    oss:ObjectCreated:PutObject is selected in this example.

    Trigger Rule Enter the prefix and suffix for the trigger rule. For information about the precautions, see Trigger rules.
    Role Operation
    1. Select Quick Authorize from the drop-down list.
    2. Click Authorize.
    3. On the page that appears, click Confirm Authorization Policy.

    The trigger role is AliyunOSSEventNotificationRole.

    You can view the created trigger in the trigger list.create-trigger-result

What to do next

  1. Define a function
  2. Test a function