Sending messages to SQS from AWS Lambda

  Рет қаралды 17,666

Endre Synnes

Endre Synnes

Күн бұрын

Пікірлер: 32
@ethandv6225
@ethandv6225 11 ай бұрын
2 years later and this video is still extremely helpful and useful! Your style and pacing was great as well! Thanks for concise and helpful tutorial
@EndreSynnes
@EndreSynnes 10 ай бұрын
Thank you so much!😄
@Borixca
@Borixca 3 жыл бұрын
Thank you very much. Your video helps me a lot. I managed to create a queue, and send message from the lambda.
@EndreSynnes
@EndreSynnes 3 жыл бұрын
Great to hear that this video could help you! 😄
@caiquepereiraalves5521
@caiquepereiraalves5521 2 жыл бұрын
Help me mush with this video
@lawilsada
@lawilsada 3 жыл бұрын
Love this video, Thank you! I'm working on a solution where my application which requires this as part of the application. My use case uses SES to deliver a raw email object to S3, trigger a lambda to cross into gov cloud to deliver a presigned object to SQS to be then picked up by another lambda! This helps me get some things cleared up on this project that i was a bit confused about.Thanks again!
@EndreSynnes
@EndreSynnes 3 жыл бұрын
Thank you!😄 Fantastic to hear that this video could help you in your project!
@arzoo2155
@arzoo2155 3 жыл бұрын
These videos are really good! please keep making them.
@EndreSynnes
@EndreSynnes 3 жыл бұрын
Thank you, I will! 😄 I'm working on a video about Kinesis for next week. Let me know if there is any topic you want me to cover in future videos 🙌
@KOUSHIK0890
@KOUSHIK0890 2 жыл бұрын
I have a query. Can't the destination configuration be used directly then the boto3 method?
@EndreSynnes
@EndreSynnes 2 жыл бұрын
Hi, sorry for the late reply! I'm not quite sure what you mean by the destination configuration being used directly? In my example I'm adding the destination configuration (queue URL) directly in the send method. An alternative could be to use boto3.resource('sqs') instead of boto3.client('sqs') as shown here: boto3.amazonaws.com/v1/documentation/api/latest/guide/sqs.html#sending-messages In the example linked above, they use Resource (boto3.amazonaws.com/v1/documentation/api/latest/guide/resources.html#guide-resources) instead. This is a higher level abstraction which can provide an even cleaner implementation in your code. The only downside is that Resource is still quite limited when it comes to other services than SQS, SNS and S3. I hope this answered your question, if not let me know 😄
@andybarrell26
@andybarrell26 10 ай бұрын
I was hoping there was a way to send the message to the SQS queue without needing to know the exact SQS URL. Similar to how you can call other Lambdas without hitting the function URL when already in a Lambda.
@EndreSynnes
@EndreSynnes 9 ай бұрын
Hi 😄 I would also like that, but the only way to do that (that I have seen), is to first call the "get_queue_url" function: boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sqs/client/get_queue_url.html
@InterviewDOT
@InterviewDOT 2 жыл бұрын
Excellent 👌
@EndreSynnes
@EndreSynnes 2 жыл бұрын
Thank you! 😄
@anishachoudhury_
@anishachoudhury_ 2 жыл бұрын
CAn you please tell how to send msg from 1 was account to another using SQS
@EndreSynnes
@EndreSynnes 2 жыл бұрын
Hi, I have not tested sending messages a queue in another account, but I know it should work: stackoverflow.com/questions/59396973/how-to-send-messages-to-an-sqs-queue-in-a-different-aws-account I can make a video about this in the future 😄
@EndreSynnes
@EndreSynnes 2 жыл бұрын
​@@anishachoudhury_ Yes, I guess the example in the link you provided should be good alternative if you are working with AWS IoT 😄 I'm not sure what your use case is, but if you are for example working with AWS lambda, and want to read/write messages from an SQS queue in another account. Then this should also work: docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html Anyways, good that you found a solution that works for you! 😄
@hasthirevathi7910
@hasthirevathi7910 2 жыл бұрын
how to send message from Lambda in a AWS account 1 to a SQS in a different region in Account1 and Different AWS account(account 2)?
@EndreSynnes
@EndreSynnes 2 жыл бұрын
Hi😄 If you want to send messages to another region in the same account using the boto3 sdk, then you need to define the destination region in the boto3 client object like this: client = boto3.client("sqs", region_name="DESTINATION_REGION_NAME"). This is because region is not read from the queue url ( aws.amazon.com/premiumsupport/knowledge-center/sqs-queuedoesnotexist-errors/ ). I have not tested sending messages a queue in another account, but i guess this should work: stackoverflow.com/questions/59396973/how-to-send-messages-to-an-sqs-queue-in-a-different-aws-account By the way if you haven't, you should look into the pricing of cross region data transfer as they may differ from data being sent within the same region😊
@cloudagnostic
@cloudagnostic 2 жыл бұрын
I would like to make a queuing application. Would sis be a good start ?
@EndreSynnes
@EndreSynnes 2 жыл бұрын
Hi 😄 Yes SQS is a good service for getting started with queuing applications. As I talk about in this video, you can choose between Standard and FIFO SQS queues which both has their advantages and disadvantages, depending on you requirements. There are also other AWS managed services which provide queuing in some form or an other, like for instance AWS Kinesis, which I've made two videos about: - kzbin.info/www/bejne/aJKTc3lvbN6JraM - kzbin.info/www/bejne/hZPapqidbMmIiac AWS also have a kafka service called MSK, which I may make a video about at some point.
@ssss-u7w
@ssss-u7w Жыл бұрын
thanks
@himanshubhandari7222
@himanshubhandari7222 3 жыл бұрын
Is its possible for you to provide some code snippet for node js.?
@EndreSynnes
@EndreSynnes 3 жыл бұрын
Hi, thank you for the question! 😄 I could write a code snippet myself, but I don't think It would be any better than the one provided in the AWS documentation (since I'm not a node.js expert)🙈. I'll link that here: github.com/awsdocs/aws-doc-sdk-examples/blob/main/javascript/example_code/sqs/sqs_sendmessage.js I hope this is what you where looking for? 😄
@himanshubhandari7222
@himanshubhandari7222 3 жыл бұрын
@@EndreSynnes thank you 😀
@pss_crs
@pss_crs 3 жыл бұрын
Why does this clip have 5 views and fake pranks have millions
@EndreSynnes
@EndreSynnes 3 жыл бұрын
Thank you 🙌😊 It has been fun making these videos, so It’s going to be interesting to see if they at some point gain more traction. That being said, my main motivations are creating videos about topics that interest me and motivating people to learn about the opportunities within cloud development 😃
@nonamespls3468
@nonamespls3468 4 ай бұрын
AWSLambdaSQSQueueExecutionRole is such a misleading and st*pid way to name a policy, you would think it allows Lamda to send message to SQS. But it only allows Lambda to read from SQS. Damn AWS really is bad at naming stuff.
@EndreSynnes
@EndreSynnes 4 ай бұрын
So true 😅 The only AWS managed policy that allows it (that I know of) is the "AmazonSQSFullAccess". Then again this way too wide of a policy to use in a production environment.
AWS SQS + Lambda Setup Tutorial - Step by Step
12:02
Be A Better Dev
Рет қаралды 63 М.
Who is More Stupid? #tiktok #sigmagirl #funny
0:27
CRAZY GREAPA
Рет қаралды 10 МЛН
Непосредственно Каха: сумка
0:53
К-Media
Рет қаралды 12 МЛН
Sending messages to SNS from AWS Lambda
6:31
Endre Synnes
Рет қаралды 12 М.
Create event-based projects using S3, Lambda and SQS
17:33
Knowledge Amplifier
Рет қаралды 11 М.
AWS Lambda send and receive SQS messages - Using NodeJS 🚀
7:00
Code Made Simple
Рет қаралды 1,3 М.
Failure Handling Using a Lambda DLQ (Dead Letter Queue)
8:14
Be A Better Dev
Рет қаралды 41 М.
AWS SQS message trigger Lambda function 🚀
18:01
AWS cloud demos
Рет қаралды 2,4 М.
Errors and retries - Lambda Event Source Mapping with SQS trigger
11:43
Saborni Bhattacharya
Рет қаралды 2,9 М.