Skip to content

Commit aaf9604

Browse files
author
Dinesh Sajwan
committed
feat(documentation): updated lambda memory, fix test case
1 parent 7bfa48c commit aaf9604

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ The following constructs are available in the library:
8181
| [Amazon Bedrock](./src/cdk-lib/bedrock/README.md) | CDK L2 Constructs for Amazon Bedrock. | Amazon Bedrock, Amazon OpenSearch Serverless, AWS Lambda |
8282
| [Amazon OpenSearch Serverless Vector Collection](./src/cdk-lib/opensearchserverless/README.md) | CDK L2 Constructs to create a vector collection. | Amazon OpenSearch Vector Index |
8383
| [Amazon OpenSearch Vector Index](./src/cdk-lib/opensearch-vectorindex/README.md) | CDK L1 Custom Resource to create a vector index. | Amazon OpenSearch Serverless, AWS Lambda |
84+
| [Content Generation](./src/patterns/gen-ai/aws-contentgen-appsync-lambda/) | Generate images from text using Amazon titan-image-generator-v1 or stability.stable-diffusion-xl model. | AWS Lambda, Amazon Bedrock, AWS AppSync |
8485

8586
# Sample Use Cases
8687

src/patterns/gen-ai/aws-contentgen-appsync-lambda/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ export class ContentGenerationAppSyncLambda extends Construct {
486486
tracing: lambda_tracing,
487487
vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS },
488488
securityGroups: [this.securityGroup],
489-
memorySize: 1_769 * 1,
489+
memorySize: 1_769 * 4,
490490
timeout: Duration.minutes(15),
491491
role: generate_image_function_role,
492492
environment: {

test/patterns/gen-ai/aws-contentgen-appsync-lambda/aws-contentgen-appsync-lambda.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import * as cdk from 'aws-cdk-lib';
1414
import { Template, Match } from 'aws-cdk-lib/assertions';
1515
import * as cognito from 'aws-cdk-lib/aws-cognito';
1616
import {
17-
ContentGenerationAppsyncLambda,
18-
ContentGenerationAppsyncLambdaProps,
17+
ContentGenerationAppSyncLambda,
18+
ContentGenerationAppSyncLambdaProps,
1919
} from '../../../../src/patterns/gen-ai/aws-contentgen-appsync-lambda';
2020

2121
describe('Image generation appsync lambda construct', () => {
2222
let imageTestTemplate: Template;
23-
let imageTestConstruct: ContentGenerationAppsyncLambda;
23+
let imageTestConstruct: ContentGenerationAppSyncLambda;
2424
const cognitoPoolId = 'region_XXXXX';
2525

2626
afterAll(() => {
@@ -39,11 +39,11 @@ describe('Image generation appsync lambda construct', () => {
3939
cognitoPoolId,
4040
);
4141

42-
const imageTestProps: ContentGenerationAppsyncLambdaProps = {
42+
const imageTestProps: ContentGenerationAppSyncLambdaProps = {
4343
cognitoUserPool: userPoolLoaded,
4444
};
4545

46-
imageTestConstruct = new ContentGenerationAppsyncLambda(imageTestStack, 'test', imageTestProps);
46+
imageTestConstruct = new ContentGenerationAppSyncLambda(imageTestStack, 'test', imageTestProps);
4747
imageTestTemplate = Template.fromStack(imageTestStack);
4848
});
4949

0 commit comments

Comments
 (0)