You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You'll have to excuse my knowledge here but from my understanding, if a websocket request comes in, it would be converted to a http event but I've tried may different approaches but I can't seem to get it to work.
Initially, I built it as a http request authorizer with the below code, but I don't think this works the same way for an apigateway socket connect authorizer request.
Is there anything from the default set up that cargo lambda new gives that I must do to access the token?
Any help is appreciated (My rust knowledge is fairly low at the moment so this isn't helping)
ps. I have omited the rest of the authorizer code as I don't think it's relevant as I'm just getting the following error and none of my logs
ERROR Lambda runtime invoke{requestId="-----" xrayTraceId="Root=1-xxxxxx;Parent=xxxxxx;Sampled=0;Lineage=xxxxxx:0"}:
DeserializeError { inner: Error { path: Path { segments: [] }, original:
Error("this function expects a JSON payload from Amazon API Gateway, Amazon Elastic Load Balancer,
or AWS Lambda Function URLs, but the data doesn't match any of those services' events", line: 0, column: 0) } }
The text was updated successfully, but these errors were encountered:
use lambda_http::{ service_fn,Error};use lambda_runtime::LambdaEvent;asyncfnfunction_handler(event:LambdaEvent<MyAuthorizerEventStruct>) -> Result<AuthResponse,Error>{// My authorizer code}asyncfnmain() -> Result<(),Error>{
tracing_subscriber
::fmt().with_max_level(tracing::Level::INFO)// disable printing the name of the module in every log line..with_target(false)// disabling time is handy because CloudWatch will add the ingestion time..without_time().init();
lambda_runtime::run(service_fn(function_handler)).await?;Ok(())}
Comments on closed issues are hard for the maintainers of this repository to see.
If you need more assistance, please 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.
You'll have to excuse my knowledge here but from my understanding, if a websocket request comes in, it would be converted to a http event but I've tried may different approaches but I can't seem to get it to work.
Initially, I built it as a http request authorizer with the below code, but I don't think this works the same way for an apigateway socket connect authorizer request.
Is there anything from the default set up that cargo lambda new gives that I must do to access the token?
Any help is appreciated (My rust knowledge is fairly low at the moment so this isn't helping)
ps. I have omited the rest of the authorizer code as I don't think it's relevant as I'm just getting the following error and none of my logs
The text was updated successfully, but these errors were encountered: