In this video, we are going to verify and test key message polling from the lambda.
For that purpose, please open a PlayStation console.
Go to my Q, Amazon asks Q and select the send and receive message.
So we will send a message.
For example, I'm going to write down test message from Aqueous, see that we don't set any delivery
delay.
Now we can send this message to the space queue.
Please click the send message and see what's happened.
So our message has been sent and ready for the received.
So if you go back to our lambda function, this will be pulled from the lambda function and execute
the lambda invocation.
If you open the lambda function, which is the my function and go to monitoring and click the V logs.
In cloud logs, you can see that we have one log stream.
If you open the latest log stream, we can see that our invocation happens successfully.
This is the incoming event JSON from the OR McHugh and this is the message ID received handle and the
body that I have written in the case test message from the case.
And after that we will iterate the records of these array and write down the incoming body information.
In here you can see the info log comes in here, which is the test message from SCS, which is the body
information of the previous message from the SCS.
So if you set the batch size ten and if you send the ten records in the Amazon queue, this will be
iterate our records and we will lock everybody information into the queue.
For example, let me test again go back to our Amazon case and I'm going to send this message with a
little bit delay.
For example, I'm going to put a 22nd delay and I'm going to send several message and see what's happened.
For example, this is the test message.
One test message to.
Three.
For.
And five.
So that means we add five items in the queue.
So please wait for 20 seconds and after that five message will be added to queue and this will be pulled
from the lambda function after waiting to one second.
If you come back and open the box, you will see that our five message comes into our looks.
This is the one, second, third, four and five.
So that means these all five message is executed in a batch because our base size is ten.
If you go back to our lambda function and go to configuration and triggers, you can see that this is
our trigger and see the details.
The size is ten.
So that means if we send 11 record in the queue, these will be handled the lambda function in two times.
That means these will be get and receive the first ten message and execute the time message and after
that receive again lambda function the space and this will be get the one message which is the left
from the ten and this will be executed in a lambda function.
So this is the batch size and the receive message operation.
This is very important when you are working with the Lambda and the SCS.