What do I do if a trigger cannot trigger function execution?
A trigger may fail to invoke your function due to a misconfigured triggering rule or an incorrect trigger role. Check the relevant section below based on your trigger type.
OSS trigger issues
The bucket and function are in different regions
The Object Storage Service (OSS) bucket and your function must be in the same region. If they are in different regions, the trigger cannot invoke the function.
Move the bucket or the function so that both reside in the same region.
The object prefix or suffix does not match
The prefix or suffix of the uploaded object must match the prefix or suffix configured for the trigger. Objects that do not match are ignored.
Example: If the trigger prefix is ab, uploading a/b.zip, ab.zip, and abc.zip to OSS triggers function execution only for ab.zip and abc.zip.
Check your trigger configuration and correct the prefix or suffix.
The OSS event type does not match
The event generated by the upload operation must match the event type configured in the trigger. Common mismatches:
| Upload method | Event generated | Trigger event to configure |
|---|---|---|
| ossbrowser (multipart upload) | oss:ObjectCreated:CompleteMultipartUpload | oss:ObjectCreated:CompleteMultipartUpload |
| Function Compute console upload | oss:ObjectCreated:PostObject | oss:ObjectCreated:PostObject |
PutObject API call | oss:ObjectCreated:PutObject | oss:ObjectCreated:PutObject |
Update the trigger event type to match the method used to upload objects.
Deleting an object from a versioning-enabled bucket without a version ID
When you delete an object from a versioning-enabled OSS bucket without specifying a version ID (for example, using ossbrowser), OSS does not trigger the oss:ObjectRemoved:DeleteObject or oss:ObjectRemoved:DeleteObjects event. Instead, the current version becomes a historical version and a delete marker is added.
Specify a version ID when deleting objects from a versioning-enabled bucket. For details, see the "FAQ" section of OSS event notifications overview.
Tablestore trigger issues
Stream Information parameter is not enabled for the data table
A Tablestore trigger requires the Stream Information parameter to be set to Enabled on the source data table. If the Stream Information parameter is disabled, the trigger has no data to consume and cannot invoke the function.
Enable the Stream Information parameter on your Tablestore data table. For steps, see "Step 1: Enable the Stream feature for a data table" in Use Function Compute.
Trigger role issues
The trigger role grants the source service (such as OSS) permission to invoke your function. If the role is deleted or lacks the required permissions, the trigger silently fails.
Check the following:
Role exists: Verify the role has not been deleted in the RAM console.
Role has the required permissions: Confirm the role grants the source service permission to call Function Compute.
Use the predefined system role for your trigger type:
| Trigger type | Predefined role |
|---|---|
| OSS trigger | AliyunOSSEventNotificationRole |
For configuration steps, see Configure a native OSS trigger.
Contact technical support
If the issue persists after you check the items above, join the DingTalk user group (ID: 11721331) for help. Provide the following information:
Alibaba Cloud account
OSS bucket name
Service name
Function name
Event source