Skip to content

Commit

Permalink
add pre-signed url permission (#411)
Browse files Browse the repository at this point in the history
  • Loading branch information
statefb authored Jun 27, 2024
1 parent b7c862f commit 409443d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cdk/lib/bedrock-chat-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export class BedrockChatStack extends cdk.Stack {
auth,
bedrockRegion: props.bedrockRegion,
largeMessageBucket,
documentBucket,
});
frontend.buildViteApp({
backendApiEndpoint: backendApi.api.apiEndpoint,
Expand Down
2 changes: 2 additions & 0 deletions cdk/lib/constructs/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface WebSocketProps {
readonly auth: Auth;
readonly bedrockRegion: string;
readonly tableAccessRole: iam.IRole;
readonly documentBucket: s3.IBucket;
readonly websocketSessionTable: ITable;
readonly largeMessageBucket: s3.IBucket;
readonly accessLogBucket?: s3.Bucket;
Expand Down Expand Up @@ -83,6 +84,7 @@ export class WebSocket extends Construct {
largePayloadSupportBucket.grantRead(handlerRole);
props.websocketSessionTable.grantReadWriteData(handlerRole);
props.largeMessageBucket.grantReadWrite(handlerRole);
props.documentBucket.grantRead(handlerRole);

const handler = new DockerImageFunction(this, "Handler", {
code: DockerImageCode.fromImageAsset(
Expand Down

0 comments on commit 409443d

Please sign in to comment.