File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed
Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -71,21 +71,18 @@ export class VectorIndex extends Construct {
7171 }
7272 } )
7373
74- // const collectionArn = `arn:aws:aoss:${props.region}:${props.account}:collection/${props.collection.name}`
75- // eslint-disable-next-line max-len
76- // const indexArn = `arn:aws:aoss:${props.region}:${props.account}:index/${props.collection.name}/${props.indexName}`
74+ const collectionArn = `arn:aws:aoss:${ props . region } :${ props . account } :collection/${ props . collection . name } `
75+ const indexArn = `arn:aws:aoss:${ props . region } :${ props . account } :index/${ props . collection . name } /${ props . indexName } `
7776
78- const collectionArn = `arn:aws:aoss:${ props . region } :${ props . account } :collection/*`
79- const indexArn = `arn:aws:aoss:${ props . region } :${ props . account } :index/*`
8077 const getCollectionPolicy = new PolicyStatement ( {
8178 actions : [
82- "opensearchserverless :BatchGetCollection"
79+ "aoss :BatchGetCollection"
8380 ] ,
8481 resources : [ collectionArn ]
8582 } )
8683 const getIndexPolicy = new PolicyStatement ( {
8784 actions : [
88- "opensearchserverless :BatchGetIndex"
85+ "aoss :BatchGetIndex"
8986 ] ,
9087 resources : [ indexArn ]
9188 } )
Original file line number Diff line number Diff line change 88aoss = boto3 .client ("opensearchserverless" )
99
1010
11- @logger .inject_lambda_context
11+ @logger .inject_lambda_context ( log_event = True )
1212def handler (event , context ):
13- logger .info ("Received event" , extra = {"event" : event })
1413 request_type = event ["RequestType" ]
1514 collection_name = event ["ResourceProperties" ]["CollectionName" ]
1615 index_name = event ["ResourceProperties" ]["IndexName" ]
You can’t perform that action at this time.
0 commit comments