From fdf7d903722920ffb2a4db1a7867b4eebbc4051b Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 17 Jun 2024 10:58:37 +0200 Subject: [PATCH 01/14] :tada: adding a new post on migrating to Knative Functions Signed-off-by: Matthias Wessendorf --- blog/config/nav.yml | 1 + blog/docs/articles/aws_to_func_migration.md | 103 ++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 blog/docs/articles/aws_to_func_migration.md diff --git a/blog/config/nav.yml b/blog/config/nav.yml index 648b878a227..a1f570d23a5 100644 --- a/blog/config/nav.yml +++ b/blog/config/nav.yml @@ -47,6 +47,7 @@ nav: - releases/announcing-knative-v0-3-release.md - releases/announcing-knative-v0-2-release.md - Articles: + - articles/aws_to_func_migration.md - articles/consuming_s3_data_with_knative.md - articles/How-IBM-watsonx-Assistant-uses-Knative-Eventing-to-train-machine-learning-models.md - articles/enhancing-the-knative-experience.md diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md new file mode 100644 index 00000000000..73ee4df1098 --- /dev/null +++ b/blog/docs/articles/aws_to_func_migration.md @@ -0,0 +1,103 @@ +# Migrating Functions from AWS Lambda to Knative Functions using Golang + +**Author: Matthias Weßendorf, Senior Principal Software Engineer @ Red Hat** + +_In a [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we discussed the consumption of notifications from an AWS S3 bucket inside a Knative Function. This post will describe the migration from a AWS Lambda Function, receiving S3 notifications, to Knative Functions._ + +With Serverless Functions one of the common use-cases is to execute custom code based on an event trigger, like a notification from the AWS S3 service. With AWS Lambda you can run those programs on Amazon's cloud offerings, but running the code on your own data-center is much harder. + +## A simple AWS Lambda function for AWS S3 + +Taking a look at their [sample repository](https://github.com/aws/aws-lambda-go/blob/main/events/README_S3.md){:target="_blank"} shows a minimal, yet complete function for receiving AWS S3 event notifications. Lets take a look at their code: + +```go +// main.go +package main + +import ( + "fmt" + "context" + "github.com/aws/aws-lambda-go/lambda" + "github.com/aws/aws-lambda-go/events" +) + +func handler(ctx context.Context, s3Event events.S3Event) { + for _, record := range s3Event.Records { + s3 := record.S3 + fmt.Printf("[%s - %s] Bucket = %s, Key = %s \n", record.EventSource, record.EventTime, s3.Bucket.Name, s3.Object.Key) + } +} + + +func main() { + // Make the handler available for Remote Procedure Call by AWS Lambda + lambda.Start(handler) +} +``` + +You see a two functions here, the `handler` function for the custom application logic and a `main` function which calls some AWS Lambda APIs and registers the custom handler with it. The signature of the `handler` references the standard `Context` and an `S3Event` from the AWS Lambda SDK. In order to be able to run the function you need a two vendor specific dependencies. The `main` function is also not specific to the actual program, but more technically needed in order have the custom `handler` receive events. + + +## A much simpler Knative Function for AWS S3 + +In the [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we already discussed how to consume notifications from AWS Lambda in an on-premise cluster using Knative Eventing, but lets take a look at the code again: + +```go +package function + +import ( + "context" + "fmt" + + "github.com/cloudevents/sdk-go/v2/event" +) + +// Handle an event. +func Handle(ctx context.Context, ce event.Event) (*event.Event, error) { + fmt.Println("Received S3 event notification") + fmt.Println("CloudEvent Subject attribute: " + ce.Subject()) + fmt.Println("CloudEvent Source attribute: " + ce.Source()) + + // Some processing of the payload of the CloudEvent... + + return nil, nil +} +``` + +You will notice that this complete program contains only one function which is focused on the processing of the incoming events. You will notice that we do not need to write a `main` function to register our event handler with some middleware. Knative Functions does this all for you, behind the scenes. Looking closer at the signature of the `Handle` function you also notice the standard `Context` API and an `Event` type. This is no vendor specific import. It references to the Golang SDK for [CNCF CloudEvents](https://www.cncf.io/projects/cloudevents/){:target="_blank"}, which is a specification for describing event data in a common way. + +## Knative CLI for smooth development and deployment + +The Knative Function project does not only shine with its vendor-neutral approach for programming Serverless Functions, it also comes with a handy CLI that assists developers with the creation of the Linux container image and the deployment to a Kubernetes cluster, as already discussed in the [previous blog post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"}, it also allows you to test and run the function locally, by just invoking: + +``` +$ func run +``` + +The log for the program reads like: + +``` +Building function image +🙌 Function built: //: +Initializing CloudEvent function +listening on http port 8080 +Running on host port 8080 +``` + +Now you can simply test the Knative Function on your machine, like: + +``` +$ curl -v -X POST \ + -H "content-type: application/json" \ + -H "ce-specversion: 1.0" \ + -H "ce-source: /my/file/storage" \ + -H "ce-type: test.event.type" \ + -H "ce-subject: test-file.txt" \ + -H "ce-id: $(uuid)" \ + http://127.0.0.1:8080 +``` + + +## Conclusion + +With Knative Functions it is pretty straightforward to build vendor-neutral function for consuming event notifications from 3rd party cloud services, such as AWS S3. Deploying those functions as Linux containers to your own on-premise Kubernetes cluster is supported by the Knative CLI as well as testing the function locally. From 06df005072bd8e913082fbe08cd05258a3b720fc Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Tue, 18 Jun 2024 11:10:20 +0200 Subject: [PATCH 02/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: David Simansky --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index 73ee4df1098..b6f9c84c2ce 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -100,4 +100,4 @@ $ curl -v -X POST \ ## Conclusion -With Knative Functions it is pretty straightforward to build vendor-neutral function for consuming event notifications from 3rd party cloud services, such as AWS S3. Deploying those functions as Linux containers to your own on-premise Kubernetes cluster is supported by the Knative CLI as well as testing the function locally. +With Knative Functions it is pretty straightforward to build cloud vendor-neutral function for consuming event notifications from 3rd party cloud services, such as AWS S3. Deploying those functions as Linux containers to your own on-premise Kubernetes cluster is supported by the Knative CLI as well as testing the function locally. From 26002375a431f61b20699c208f085c483ac870ab Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:27:07 +0200 Subject: [PATCH 03/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index b6f9c84c2ce..ad3b632862b 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -8,7 +8,7 @@ With Serverless Functions one of the common use-cases is to execute custom code ## A simple AWS Lambda function for AWS S3 -Taking a look at their [sample repository](https://github.com/aws/aws-lambda-go/blob/main/events/README_S3.md){:target="_blank"} shows a minimal, yet complete function for receiving AWS S3 event notifications. Lets take a look at their code: +Taking a look at a Lambda [sample repository](https://github.com/aws/aws-lambda-go/blob/main/events/README_S3.md){:target="_blank"} shows a minimal, yet complete function for receiving AWS S3 event notifications. Lets take a look at the code: ```go // main.go From 445089fd5614f5df8d233c00e44bfb66eb8cdb98 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:27:16 +0200 Subject: [PATCH 04/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index ad3b632862b..c7a89684d75 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -35,7 +35,7 @@ func main() { } ``` -You see a two functions here, the `handler` function for the custom application logic and a `main` function which calls some AWS Lambda APIs and registers the custom handler with it. The signature of the `handler` references the standard `Context` and an `S3Event` from the AWS Lambda SDK. In order to be able to run the function you need a two vendor specific dependencies. The `main` function is also not specific to the actual program, but more technically needed in order have the custom `handler` receive events. +You see two functions here: `handler` for the custom application logic and `main` which calls some AWS Lambda APIs which register the custom handler. The signature of `handler` references the standard `Context` and an `S3Event` from the AWS Lambda SDK. In order to be able to run the function one needs two vendor-specific dependencies and a `main` function. These are not directly related to the actual program, but are necessary technical plumbing in order start the custom `handler` and register it to receive events. ## A much simpler Knative Function for AWS S3 From 569286fd43f5a891ee9d1ebe26fb885500408a5f Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:27:23 +0200 Subject: [PATCH 05/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index c7a89684d75..95749166644 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -6,7 +6,7 @@ _In a [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_b With Serverless Functions one of the common use-cases is to execute custom code based on an event trigger, like a notification from the AWS S3 service. With AWS Lambda you can run those programs on Amazon's cloud offerings, but running the code on your own data-center is much harder. -## A simple AWS Lambda function for AWS S3 +## A Lambda Function for AWS S3 Taking a look at a Lambda [sample repository](https://github.com/aws/aws-lambda-go/blob/main/events/README_S3.md){:target="_blank"} shows a minimal, yet complete function for receiving AWS S3 event notifications. Lets take a look at the code: From 8a850b7046ec0b05d4f8e3e021f963a3fbcef3cf Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:27:36 +0200 Subject: [PATCH 06/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index 95749166644..1ce65b43ee4 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -38,7 +38,7 @@ func main() { You see two functions here: `handler` for the custom application logic and `main` which calls some AWS Lambda APIs which register the custom handler. The signature of `handler` references the standard `Context` and an `S3Event` from the AWS Lambda SDK. In order to be able to run the function one needs two vendor-specific dependencies and a `main` function. These are not directly related to the actual program, but are necessary technical plumbing in order start the custom `handler` and register it to receive events. -## A much simpler Knative Function for AWS S3 +## A Simpler Knative Function for AWS S3 In the [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we already discussed how to consume notifications from AWS Lambda in an on-premise cluster using Knative Eventing, but lets take a look at the code again: From 6746a19df9bf7a6a8f5ecd2d68229025dbd79003 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:27:45 +0200 Subject: [PATCH 07/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index 1ce65b43ee4..4ada9b0fd3e 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -40,7 +40,7 @@ You see two functions here: `handler` for the custom application logic and `main ## A Simpler Knative Function for AWS S3 -In the [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we already discussed how to consume notifications from AWS Lambda in an on-premise cluster using Knative Eventing, but lets take a look at the code again: +In the [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we discuss how to consume notifications from AWS Lambda in an on-premise cluster using Knative Eventing. Lets take a look at the code again: ```go package function From df566284e3de95bf9d59eb4cd230837a9fdbb46e Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:27:55 +0200 Subject: [PATCH 08/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index 4ada9b0fd3e..bde4ed13bdf 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -64,7 +64,9 @@ func Handle(ctx context.Context, ce event.Event) (*event.Event, error) { } ``` -You will notice that this complete program contains only one function which is focused on the processing of the incoming events. You will notice that we do not need to write a `main` function to register our event handler with some middleware. Knative Functions does this all for you, behind the scenes. Looking closer at the signature of the `Handle` function you also notice the standard `Context` API and an `Event` type. This is no vendor specific import. It references to the Golang SDK for [CNCF CloudEvents](https://www.cncf.io/projects/cloudevents/){:target="_blank"}, which is a specification for describing event data in a common way. +Note that this complete program contains only one function, which is focused on the processing of the incoming events. There is no need for `main`, or to register our event handler with middleware. Therefore, there is also no need for imports. Knative Functions handles creating the process boundary and applying middleware automatically. + +Looking closer at the signature of the `Handle` function, we see the standard `Context` API and an `Event` type. This is no vendor specific import. It references the Golang SDK for [CNCF CloudEvents](https://www.cncf.io/projects/cloudevents/){:target="_blank"}, which is a specification for describing event data in a common way. ## Knative CLI for smooth development and deployment From 3f69443b094da677598c647a0d0e51ec83bc31b3 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:28:06 +0200 Subject: [PATCH 09/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index bde4ed13bdf..5f5bed615fe 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -68,7 +68,7 @@ Note that this complete program contains only one function, which is focused on Looking closer at the signature of the `Handle` function, we see the standard `Context` API and an `Event` type. This is no vendor specific import. It references the Golang SDK for [CNCF CloudEvents](https://www.cncf.io/projects/cloudevents/){:target="_blank"}, which is a specification for describing event data in a common way. -## Knative CLI for smooth development and deployment +## Knative CLI for Smooth Development and Deployment The Knative Function project does not only shine with its vendor-neutral approach for programming Serverless Functions, it also comes with a handy CLI that assists developers with the creation of the Linux container image and the deployment to a Kubernetes cluster, as already discussed in the [previous blog post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"}, it also allows you to test and run the function locally, by just invoking: From 1e356602d36d549ae51563427391a20a884e5450 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:28:14 +0200 Subject: [PATCH 10/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index 5f5bed615fe..7685640c130 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -70,7 +70,7 @@ Looking closer at the signature of the `Handle` function, we see the standard `C ## Knative CLI for Smooth Development and Deployment -The Knative Function project does not only shine with its vendor-neutral approach for programming Serverless Functions, it also comes with a handy CLI that assists developers with the creation of the Linux container image and the deployment to a Kubernetes cluster, as already discussed in the [previous blog post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"}, it also allows you to test and run the function locally, by just invoking: +The Knative Function project does not only offer a vendor-neutral approach for creating Serverless Functions, it also comes with a handy CLI that assists with the creation of the Linux container image and the deployment to a Kubernetes cluster. This is covered in the [previous blog post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"}. It also allows you to test and run the function locally by invoking: ``` $ func run From 5e8441b362ec1d0bb28777868fb9d46777dccabf Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:28:25 +0200 Subject: [PATCH 11/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: Luke Kingland --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index 7685640c130..f108c7e2d52 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -102,4 +102,4 @@ $ curl -v -X POST \ ## Conclusion -With Knative Functions it is pretty straightforward to build cloud vendor-neutral function for consuming event notifications from 3rd party cloud services, such as AWS S3. Deploying those functions as Linux containers to your own on-premise Kubernetes cluster is supported by the Knative CLI as well as testing the function locally. +With Knative Functions it is straightforward to build cloud vendor-neutral functions for consuming event notifications from 3rd party cloud services such as AWS S3. Deploying those functions as Linux containers to your own on-premise Kubernetes cluster is also supported by the Knative CLI, as well as testing the function locally. From 04c154137558f2081169944dfca26485b94d52cf Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 11:43:44 +0200 Subject: [PATCH 12/14] A little more tweaking of the post Signed-off-by: Matthias Wessendorf --- blog/docs/articles/aws_to_func_migration.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index f108c7e2d52..f95d259057a 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -2,7 +2,7 @@ **Author: Matthias Weßendorf, Senior Principal Software Engineer @ Red Hat** -_In a [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we discussed the consumption of notifications from an AWS S3 bucket inside a Knative Function. This post will describe the migration from a AWS Lambda Function, receiving S3 notifications, to Knative Functions._ +_In a [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we discussed the consumption of notifications from an AWS S3 bucket inside a Knative Function. This post will describe the migration from a AWS Lambda Function, receiving S3 notifications, to [Knative Functions](docs/functions){:target="_blank"}._ With Serverless Functions one of the common use-cases is to execute custom code based on an event trigger, like a notification from the AWS S3 service. With AWS Lambda you can run those programs on Amazon's cloud offerings, but running the code on your own data-center is much harder. @@ -40,7 +40,12 @@ You see two functions here: `handler` for the custom application logic and `main ## A Simpler Knative Function for AWS S3 -In the [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we discuss how to consume notifications from AWS Lambda in an on-premise cluster using Knative Eventing. Lets take a look at the code again: +!!! note + + To learn more about Knative Functions and how to create, build and deploy a project using the `func` CLI, check out the [documentation](docs/functions){:target="_blank"}. + + +In the [previous post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"} we discuss how to consume notifications from AWS Lambda in an on-premise cluster using Knative Eventing. Lets take a look at the `main.go` file from the S3 project again: ```go package function @@ -103,3 +108,5 @@ $ curl -v -X POST \ ## Conclusion With Knative Functions it is straightforward to build cloud vendor-neutral functions for consuming event notifications from 3rd party cloud services such as AWS S3. Deploying those functions as Linux containers to your own on-premise Kubernetes cluster is also supported by the Knative CLI, as well as testing the function locally. + +To learn more about Knative Functions visit the [documentation](docs/functions){:target="_blank"} on our website or join our CNCF Slack channel [#knative-functions](https://cloud-native.slack.com/archives/C04LKEZUXEE)! From b4360ab67cbba9b2c9fbd5160fb7dd4ecb485489 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 14:23:15 +0200 Subject: [PATCH 13/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: David Simansky --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index f95d259057a..7d0fd083ddf 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -35,7 +35,7 @@ func main() { } ``` -You see two functions here: `handler` for the custom application logic and `main` which calls some AWS Lambda APIs which register the custom handler. The signature of `handler` references the standard `Context` and an `S3Event` from the AWS Lambda SDK. In order to be able to run the function one needs two vendor-specific dependencies and a `main` function. These are not directly related to the actual program, but are necessary technical plumbing in order start the custom `handler` and register it to receive events. +You see two functions here: `handler` for the custom application logic and `main` which calls some AWS Lambda APIs which register the custom handler. The signature of `handler` references the standard `Context` and an `S3Event` from the AWS Lambda SDK. In order to be able to run the function one needs two vendor-specific dependencies and a `main` function. These are not directly related to the actual program, but are necessary technical plumbing in order to start the custom `handler` and register it to receive events. ## A Simpler Knative Function for AWS S3 From b9df68be9111f5068c93e36b1757c30712268652 Mon Sep 17 00:00:00 2001 From: Matthias Wessendorf Date: Mon, 24 Jun 2024 14:23:22 +0200 Subject: [PATCH 14/14] Update blog/docs/articles/aws_to_func_migration.md Co-authored-by: David Simansky --- blog/docs/articles/aws_to_func_migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/docs/articles/aws_to_func_migration.md b/blog/docs/articles/aws_to_func_migration.md index 7d0fd083ddf..cf5c0386f2d 100644 --- a/blog/docs/articles/aws_to_func_migration.md +++ b/blog/docs/articles/aws_to_func_migration.md @@ -75,7 +75,7 @@ Looking closer at the signature of the `Handle` function, we see the standard `C ## Knative CLI for Smooth Development and Deployment -The Knative Function project does not only offer a vendor-neutral approach for creating Serverless Functions, it also comes with a handy CLI that assists with the creation of the Linux container image and the deployment to a Kubernetes cluster. This is covered in the [previous blog post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"}. It also allows you to test and run the function locally by invoking: +The Knative Function project does not only offer a vendor-neutral approach for creating serverless functions, it also comes with a handy CLI that assists with the creation of the Linux container image and the deployment to a Kubernetes cluster. This is covered in the [previous blog post](/blog/articles/consuming_s3_data_with_knative){:target="_blank"}. It also allows you to test and run the function locally by invoking: ``` $ func run