From 9535f95bb155c2f43813b2fb0f17d8d3e126f091 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Fri, 6 Sep 2024 10:41:21 -0700 Subject: [PATCH 1/2] Do not bundle AWS SDK if default implementation is used. --- .../src/conversation/conversation_handler_construct.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ai-constructs/src/conversation/conversation_handler_construct.ts b/packages/ai-constructs/src/conversation/conversation_handler_construct.ts index 4f74591170..57b33f779f 100644 --- a/packages/ai-constructs/src/conversation/conversation_handler_construct.ts +++ b/packages/ai-constructs/src/conversation/conversation_handler_construct.ts @@ -62,7 +62,10 @@ export class ConversationHandlerFunction entry: this.props.entry ?? defaultHandlerFilePath, handler: 'handler', bundling: { - bundleAwsSDK: true, + // Do not bundle SDK if conversation handler is using our default implementation which is + // compatible with Lambda provided SDK. + // For custom entry we do bundle SDK as we can't control version customer is coding against. + bundleAwsSDK: !!this.props.entry, }, logGroup: new LogGroup(this, 'conversationHandlerFunctionLogGroup', { retention: RetentionDays.INFINITE, From 8466e4ab14e25b18982f8e1269ecc874e6454a21 Mon Sep 17 00:00:00 2001 From: Kamil Sobol Date: Fri, 6 Sep 2024 10:45:05 -0700 Subject: [PATCH 2/2] Do not bundle AWS SDK if default implementation is used. --- .changeset/happy-starfishes-trade.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/happy-starfishes-trade.md diff --git a/.changeset/happy-starfishes-trade.md b/.changeset/happy-starfishes-trade.md new file mode 100644 index 0000000000..48ceaecfa5 --- /dev/null +++ b/.changeset/happy-starfishes-trade.md @@ -0,0 +1,5 @@ +--- +'@aws-amplify/ai-constructs': patch +--- + +Do not bundle AWS SDK if default implementation is used