From d22a5ebca6f14709b98b5b146d722d89aaea0ea0 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Tue, 26 Sep 2023 13:33:41 +0200 Subject: [PATCH] GH-1021 Add documentation about configuring container images deplioyed on AWS Lambda Resolves #1021 --- .../modules/ROOT/pages/adapters/aws-intro.adoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/modules/ROOT/pages/adapters/aws-intro.adoc b/docs/modules/ROOT/pages/adapters/aws-intro.adoc index f6fac9125..86419bdcf 100644 --- a/docs/modules/ROOT/pages/adapters/aws-intro.adoc +++ b/docs/modules/ROOT/pages/adapters/aws-intro.adoc @@ -150,6 +150,24 @@ and not doing any work in custom `@PostConstruct` initializers. When using <> Function Routing works the same way. All you need is to specify `functionRouter` as AWS Handler the same way you would use the name of the function as handler. + +=== Deploying Container images + +Custom Runtime is also responsible for handling of container image deployments. +When deploying container images in a way similar to the one described https://github.com/spring-cloud/spring-cloud-function/issues/1021[here], it is important +to remember to set and environment variable `DEFAULT_HANDLER` with the name of the function. + +For example, for function bean shown below the `DEFAULT_HANDLER` value would be `readMessageFromSQS`. +[source, java] +---- +@Bean +public Consumer> readMessageFromSQS() { + return incomingMessage -> {..} +} +---- + +Also, it is important to remember to ensure tht `spring_cloud_function_web_export_enabled` is also set to `false`. It is by default. + [[notes-on-jar-layout]] == Notes on JAR Layout