-
Notifications
You must be signed in to change notification settings - Fork 55
SNS: missing field `SigningCertUrl #129
Comments
oh, that's weird, the field is here:
I'm guessing case sensitive issues 🤦 |
It happens. SigningCertUrl I did not see it as well at first look. |
On the readme: In GO I can see it is correct: I also see that what they call SNSEntity here is called SnsMessage. If it is all generated automatically, I need to find out where the name change is. Another thing that I see is: So, in theory, this SigningCertURL should be SigningCertUrl. Can you explain to me how to fix it? I think I cannot directly change the aws-lambda-events/aws_lambda_events/src/sns/mod.rs |
Yes, you can modify that file directly. Only the ones in the |
I just released 0.8.2 with the fix. Thank you all. |
Take this simple Lambda:
https://serverlessland.com/patterns/sns-sqs-lambda-sam-rust (the code is not up to date but 8 months ago it was working)
If you update the code and the libs
cargo.toml
You get an exception:
`Input LambdaEvent { payload: SqsEvent { records: [SqsMessage { message_id: Some("44dec5ec-0128-4661-9c54-a06485ead572"), receipt_handle: Some(".....="), body: Some("{\n "Type" : "Notification",\n "MessageId" : "5a1c0085-ee71-5e38-9d84-5c9bdcb02ad5",\n "TopicArn" : "arn:aws:sns:eu-central-1:xxxxx:sam-app-MySnsTopic-BWiabVkXTYg2",\n "Message" : "{\n \"name\": \"Daniele\",\n \"surname\": \"Frasca\"\n}",\n "Timestamp" : "2022-12-22T10:25:05.377Z",\n "SignatureVersion" : "1",\n "Signature" : ".....==",\n "SigningCertURL" : "https://sns.eu-central-1.amazonaws.com/SimpleNotificationService-56e67fcb41f6fec09b0196692625d385.pem",\n "UnsubscribeURL" : "https://sns.eu-central-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-central-1:xxxxx:sam-app-MySnsTopic-BWiabVkXTYg2:44fb3b0d-6b6a-48cc-9183-f52a3d238175"\n}"), md5_of_body: Some("ab0cac5be52987991d1d1b2b57a08480"), md5_of_message_attributes: None, attributes: {"SentTimestamp": "1671704705405", "SenderId": "AIDAISDDSWNBEXIA6J64K", "ApproximateFirstReceiveTimestamp": "1671704705410", "ApproximateReceiveCount": "1"}, message_attributes: {}, event_source_arn: Some("arn:aws:sqs:eu-central-1:xxxxx:sam-app-MySqsQueue-nDLzmzS8vEaH"), event_source: Some("aws:sqs"), aws_region: Some("eu-central-1") }] }, context: Context { request_id: "d187ab64-f92b-52a2-a81b-f77acb9cde03", deadline: 1671704735726, invoked_function_arn: "arn:aws:lambda:eu-central-1:xxxxxx:function:sam-app-MyFunction-QqyqP0mMMxOS", xray_trace_id: Some("Root=1-63a43081-22df4f205924b3de2b0c3b46;Parent=54651cb434f944d8;Sampled=0"), client_context: None, identity: None, env_config: Config { function_name: "sam-app-MyFunction-QqyqP0mMMxOS", memory: 128, version: "$LATEST", log_stream: "2022/12/22/[$LATEST]7da35658a61a4b0cb323242f7f20526a", log_group: "/aws/lambda/sam-app-MyFunction-QqyqP0mMMxOS" } } }
thread 'tokio-runtime-worker' panicked at 'called
Result::unwrap()
on anErr
value: Error("missing fieldSigningCertUrl
", line: 11, column: 1)', src/bin/handler.rs:29:77`
Please let me know if it is not clear.
The text was updated successfully, but these errors were encountered: