(apigatewayv2): grant permissions for sending messages to a WebSocket
See original GitHub issueI have a Lambda function and I want it to be able to post messages to a WebSocket. There doesn’t seem to be a websocket.grantPost(lambda.role)
or equivalent like there is for other resources like S3 buckets, so my Lambda always fails with 403 Forbidden when I try to send messages to the WebSocket.
Use Case
I have a Lambda that is invoked via other means not related to the WebSocket, but I want to grant it permission to send messages to clients connected to the WebSocket.
Proposed Solution
Add a grantPost()
or similar function to the WebSocketApi
class, to provide functionality equivalent to S3.Bucket.grantPut()
, DynamoDB.Table.grantReadWriteData()
, etc. but for granting permission to post messages to WebSockets.
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Controlling and managing access to a WebSocket API in API ...
Learn how to control access to a WebSocket API. ... Standard AWS IAM roles and policies offer flexible and robust access controls. You...
Read more >aws-cdk.aws-apigatewayv2 - PyPI
Grant permission to use API Gateway Management API of a WebSocket API by calling the grantManageConnections API. You can use Management API to...
Read more >API Gateway WebSocket API to SQS to AWS Lambda
This pattern creates an Amazon API Gateway WebSocket API which sends inbound messages to an Amazon SQS FIFO queue. The queue is processed...
Read more >Intro to AWS WebSockets - Ready, Set, Cloud!
Starting With AWS WebSockets. In AWS, a WebSocket is an API Gateway v2 resource. ... To add a subscription, send a message in...
Read more >AWS API Gateway Websocket Tutorial With Lambda - YouTube
In this step by step tutorial video, I show you how to set up a WebSocket API with a Lambda Function backend. This...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m working on a PR to implement this feature.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.