Skip to content

Commit

Permalink
additional fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tjholm committed Jun 18, 2023
1 parent 714177e commit ab39bb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cloud/aws/deploy/policy/iam.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func arnForResource(resource *deploy.Resource, resources *StackResources) ([]int
}
case v1.ResourceType_Websocket:
if w, ok := resources.Websockets[resource.Name]; ok {
return []interface{}{pulumi.Sprintf("%s/*", w.Api.Arn)}, nil
return []interface{}{pulumi.Sprintf("%s/*", w.Api.ExecutionArn)}, nil
}
default:
return nil, fmt.Errorf(
Expand Down
12 changes: 6 additions & 6 deletions cloud/aws/runtime/gateway/lambda.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (s *LambdaGateway) handleWebsocketEvent(ctx context.Context, evt events.API
return nil, err
}

response, err := wrk.HandleTrigger(ctx, req)
_, err = wrk.HandleTrigger(ctx, req)
if err != nil {
return events.APIGatewayProxyResponse{
StatusCode: 500,
Expand All @@ -127,11 +127,11 @@ func (s *LambdaGateway) handleWebsocketEvent(ctx context.Context, evt events.API
}, nil
}

if response.GetWebsocket() == nil || !response.GetWebsocket().Success {
return events.APIGatewayProxyResponse{
StatusCode: 500,
}, nil
}
// if response.GetWebsocket() == nil || !response.GetWebsocket().Success {
// return events.APIGatewayProxyResponse{
// StatusCode: 500,
// }, nil
// }

return events.APIGatewayProxyResponse{
StatusCode: 200,
Expand Down

0 comments on commit ab39bb4

Please sign in to comment.