Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 3.36 KB

functions.md

File metadata and controls

43 lines (27 loc) · 3.36 KB
copyright lastupdated keywords subcollection
years
2019, 2024
2024-03-20
events, serverless, whisk
cloud-object-storage

{{site.data.keyword.attribute-definition-list}}

Using {{site.data.keyword.openwhisk_short}}

{: #functions}

{{site.data.keyword.openwhisk}} is deprecated. Existing Functions entities such as actions, triggers, or sequences will continue to run, but as of 28 December 2023, you can’t create new Functions entities. Existing Functions entities are supported until October 2024. Any Functions entities that still exist on that date will be deleted. For more information, see Deprecation overview. {: deprecated}

With {{site.data.keyword.openwhisk}}, you can use your favorite programming language to write lightweight code that runs app logic in a scalable way. You can run code on-demand with HTTP-based API requests from applications or run code in response to {{site.data.keyword.cloud_notm}} services and third-party events, like updates made to a bucket. The Function-as-a-Service (FaaS) programming platform is based on the open source project Apache OpenWhisk. {: shortdesc}

This feature is not currently supported in {{site.data.keyword.cos_short}} for {{site.data.keyword.satelliteshort}}. Learn more. {: note}

Using {{site.data.keyword.cos_short}} as an event source

{: #functions-events}

{{site.data.keyword.openwhisk_short}} is an event-driven compute platform (also referred to as Serverless computing). Actions (small bits of code) run in response to triggers (some category of event), and rules associate certain actions with certain triggers. Configure {{site.data.keyword.cos_full}} to be an event source, and anytime an object in a particular bucket is written or deleted an action is triggered. You can further tailor the changes feed to only corral events for objects which match a particular prefix or suffix.

  1. Set the option to allow Cloud Functions access to listen for changes that are made to your bucket. This involves creating a service-to-service authorization, and uses the new Notifications Manager IAM role.
  2. Then, create a trigger to respond to the changes feed.
  3. Then use the {{site.data.keyword.cos_full_notm}} package to bind credentials and easily script common tasks.

For more information about using {{site.data.keyword.openwhisk_short}} with {{site.data.keyword.cos_full_notm}}, see the Functions documentation.

It is not possible to use a bucket with a firewall enabled as an event source for {{site.data.keyword.openwhisk}} actions. {: important}

Next Steps

{: #functions-next-steps}

Be sure to identify the appropriate region and endpoint for your service. Then, verify your operations with specific testing.