wirejs-deploy-amplify-basic 0.0.163-llm → 0.1.133-llm
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -213,6 +213,18 @@ const apiUrl = backend.api.resources.lambda.addFunctionUrl({
|
|
|
213
213
|
});
|
|
214
214
|
apiUrl.grantInvokeUrl(new AnyPrincipal());
|
|
215
215
|
|
|
216
|
+
backend.api.resources.lambda.addToRolePolicy(new PolicyStatement({
|
|
217
|
+
actions: [
|
|
218
|
+
'bedrock:InvokeModel',
|
|
219
|
+
'bedrock:InvokeModelWithResponseStream'
|
|
220
|
+
],
|
|
221
|
+
resources: [
|
|
222
|
+
'arn:aws:bedrock:*::foundation-model/*',
|
|
223
|
+
'arn:aws:bedrock:*:*:custom-model/*'
|
|
224
|
+
]
|
|
225
|
+
}));
|
|
226
|
+
|
|
227
|
+
|
|
216
228
|
backend.addOutput({
|
|
217
229
|
custom: {
|
|
218
230
|
api: apiUrl.url
|
|
@@ -60,7 +60,7 @@ export class RealtimeService extends Construct {
|
|
|
60
60
|
const iamProvider: AppSyncAuthProvider = { authorizationType: IAM };
|
|
61
61
|
|
|
62
62
|
realtimeService = new EventApi(this, 'realtime', {
|
|
63
|
-
apiName: `${props.appId}-${props.branchId}-realtime-api`,
|
|
63
|
+
apiName: `${props.appId.slice(0, 18)}-${props.branchId.slice(0, 18)}-realtime-api`,
|
|
64
64
|
authorizationConfig: {
|
|
65
65
|
authProviders: [iamProvider, lambdaProvider],
|
|
66
66
|
connectionAuthModeTypes: [LAMBDA],
|
|
@@ -9,19 +9,4 @@ const api = defineFunction({
|
|
|
9
9
|
timeoutSeconds: 60 * 15,
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
api.addToRolePolicy({
|
|
14
|
-
Effect: 'Allow',
|
|
15
|
-
Action: [
|
|
16
|
-
'bedrock:InvokeModel',
|
|
17
|
-
'bedrock:InvokeModelWithResponseStream'
|
|
18
|
-
],
|
|
19
|
-
Resource: [
|
|
20
|
-
// Allow access to all Bedrock models
|
|
21
|
-
'arn:aws:bedrock:*::foundation-model/*',
|
|
22
|
-
// Allow access to custom models as well
|
|
23
|
-
'arn:aws:bedrock:*:*:custom-model/*'
|
|
24
|
-
]
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export { api };
|
|
12
|
+
export { api };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wirejs-deploy-amplify-basic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.133-llm",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"recursive-copy": "^2.0.14",
|
|
44
44
|
"rimraf": "^6.0.1",
|
|
45
45
|
"wirejs-dom": "^1.0.42",
|
|
46
|
-
"wirejs-resources": "^0.1.
|
|
46
|
+
"wirejs-resources": "^0.1.133-llm"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@aws-amplify/backend": "^1.14.0",
|