File tree 1 file changed +7
-4
lines changed
src/patterns/gen-ai/aws-contentgen-appsync-lambda
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ AWS Lambda functions provisioned in this construct use [Powertools for AWS Lambd
58
58
59
59
Here is a minimal deployable pattern definition:
60
60
61
+ TypeScript
62
+
61
63
Create a CDK TypeScript project and then update the stack with below configuration.
62
64
``` cdk init sample-app --language typescript ```
63
65
@@ -78,6 +80,8 @@ const imageGeneration = new emergingTech.ContentGenerationAppsyncLambda(this, 'C
78
80
});
79
81
80
82
```
83
+ Python
84
+
81
85
Create a CDK Python project and then update the stack with below configuration.
82
86
``` cdk init sample-app --language python ```
83
87
@@ -99,10 +103,9 @@ class SampleAppStack(Stack):
99
103
cognitoPoolId= ' us-east-1_XXXXX'
100
104
userPool = cognito.UserPool.from_user_pool_id(self , ' myuserpool' , cognitoPoolId)
101
105
102
- img= genai.ContentGenerationAppsyncLambda(self , " ContentGenerationAppsyncLambda" ,
103
- {
104
- " cognitoUserPool" : userPool
105
- })
106
+ img_generated= genai.ContentGenerationAppsyncLambda(self , " ContentGenerationAppsyncLambda" ,
107
+ cognito_user_pool: userPool
108
+ )
106
109
107
110
108
111
```
You can’t perform that action at this time.
0 commit comments