Skip to content

Commit d22a5eb

Browse files
committed
GH-1021 Add documentation about configuring container images deplioyed on AWS Lambda
Resolves #1021
1 parent 89da912 commit d22a5eb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: docs/modules/ROOT/pages/adapters/aws-intro.adoc

+18
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,24 @@ and not doing any work in custom `@PostConstruct` initializers.
150150

151151
When using <<Custom Runtime>> 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.
152152

153+
154+
=== Deploying Container images
155+
156+
Custom Runtime is also responsible for handling of container image deployments.
157+
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
158+
to remember to set and environment variable `DEFAULT_HANDLER` with the name of the function.
159+
160+
For example, for function bean shown below the `DEFAULT_HANDLER` value would be `readMessageFromSQS`.
161+
[source, java]
162+
----
163+
@Bean
164+
public Consumer<Message<SQSMessageEvent>> readMessageFromSQS() {
165+
return incomingMessage -> {..}
166+
}
167+
----
168+
169+
Also, it is important to remember to ensure tht `spring_cloud_function_web_export_enabled` is also set to `false`. It is by default.
170+
153171
[[notes-on-jar-layout]]
154172
== Notes on JAR Layout
155173

0 commit comments

Comments
 (0)