You can call the CreateFunction operation to create a function.
Operation description
If the unable to access object xxx in bucket xxx error is returned when you create a function from a code package in Object Storage Service (OSS), you must grant the current user access permissions to the OSS bucket. For example, you can attach the AliyunOSSReadOnlyAccess system policy or a custom policy with finer granularity, such as oss:GetObject. For more information about policies, see Grant a RAM user the permissions to read all resources in a bucket.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
fc:CreateFunction |
create |
*All Resource
|
None | None |
Request syntax
POST /2023-03-30/functions HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body | CreateFunctionInput |
Yes |
The function configuration. |
Response elements
|
Element |
Type |
Description |
Example |
| Function |
The function configuration. |
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.