37
Views
3
Comments
Solved
[Amazon SQS Connector] Login Behavior
Question
amazon-sqs-connector
Web icon
Forge asset by Carlos Sousa

Thanks for the component.


I have a question.


In the Message_Send server action in the demo espace (AmazonSQS), you are calling the Sqs_Login action before the Sqs_SendMessage action. How does this login work? Does it login every time we call the Message_Send action even with the same credentials? Or does it reuse any login session to not make repeated calls to the Amazon server for login again?


I am not a .Net guy and hence could not dig deeper myself to find this out.


I would like the Login action to reuse the session and not make unnecessary service calls.

2018-06-12 08-51-11
Carlos Sousa
Staff
Solution

Thanks Daniël for stepping in.

Ali Ahsan, Daniël summuarized it perfectly. The login is an abstraction of the component to save those 3 parameters that are required for executing the actions.

There's no relevant overload in using it, since it doesn't imply an AWS call. 

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Ali,

The Sqs_Login action from the AmazonSQSConnector, creates a singleton object and saves the 3 input parameters (ServiceURL, AccessKeyID, and SecretAccessKey) as SqsCredentials. 

The AWS SQS service as such does not have a Login action, so there is no login performed. There is no state, no session.

https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/Welcome.html

I used it in projects as is sending/receiving a huge amount of message. I didn't feel the need to adjust the code provided by the Forge component. 

But you could make your code to call the Sqs_Login action once and then other SQS actions, that will work and minimizes the number of calls to Sqs_Login to the bare minimum. How much performance you gain I do not know.

Regards,

Daniel

2018-06-12 08-51-11
Carlos Sousa
Staff
Solution

Thanks Daniël for stepping in.

Ali Ahsan, Daniël summuarized it perfectly. The login is an abstraction of the component to save those 3 parameters that are required for executing the actions.

There's no relevant overload in using it, since it doesn't imply an AWS call. 

UserImage.jpg
Ali Ahsan

Thanks, Carlos and Daniël,


I also tested it by putting in the log messages before and after the login action and it seems to not make any network external calls.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.