Home
home
버블박스
home

아마존 큐 AWS SQS

한 줄 요약
버블에서 AWS SQS의 Queue에 메시지를 전송하거나, 메시지를 읽을 수 있습니다.
This is a plugin that enables sending to Queue or receiving messages from Queue in AWS SQS
컨택 및 제안
bubbleboxerofficial@gmail.com
노코드 마스터로 거듭나기
후원 받은 커피는 더 많은 플러그인을 만드는 원동력이 됩니다.

Core (기본 정보)

1. Reference

플러그인 페이지
데모 링크
에디터 링크

2. ChangeLog

1.0.0
send message in standard Queue 표준형 대기열에 메시지 전송하기
send message in FIFO Queue 선입선출 대기열에 메시지 전송하기
receive message from standard Queue 표준형 대기열에서 메시지 불러오기
receive message from FIFO Queue 선입선출 대기열에 메시지 불러오기

3. Instruction

해당 플러그인을 사용하려면, IAM 설정과 API 키 발급이 필요합니다. 아래의 [튜토리얼] 섹션에서 확인할 수 있습니다, You must have IAM role and API Key in AWS for using this plugin. You can check how to get this in [ Tutorial] section below.

4. Actons

a. send message in standard Queue 표준형 대기열에 메시지 전송하기

표준형 대기열에 메시지를 전송합니다. Send message to standard Queue
Input
필드
타입
설명
QueueURL
String
메시지를 보낼 Queue을 입력합니다. Enter target Queue which you want to send message
messageBody
String
메시지 Body에 들어갈 내용을 입력합니다. Enter message's content which is in body
DelaySeconds
Number
메시지 전송 지연 시간(초)을 입력합니다. Enter delayed time(second) to send message
messageAttribute_n
String
메시지의 속성 이름을 입력합니다. 속성은 최대 3개까지 사용할 수 있습니다. Enter message's attribute. you can use 3 attribute in this plugin
DataType_n
String
n번째 속성의 데이터 타입을 선택합니다. Choose data type of #n attribute
StringValue_n
String
n번째 속성에 들어갈 값을 입력합니다. Enter the value of attribute #n
return
필드
타입
설명
messageId
String
전송에 성공한 메시지의 Id 값을 반환합니다. Return Id of message which is success to send message
statuss
String
해당 액션의 상태 값을 반환합니다. 성공 시에 ‘success’를, 실패 시에 ‘fail’을 반환합니다. return the action’s state. If success, return ‘success. Otherwise, return ‘fail’
error
Number
실패 시, 에러 값을 반환합니다. return the error’s message when this action is failed
///success { "messageId": "bdd2cdd5-97f7-45ff-afc0-5ecb88c28e5b", "status": "success", "error": null } ///fail { "status": "fail", "error": "%{error.message}" }
JavaScript
복사

b. send message in FIFO Queue 선입선출 대기열에 메시지 전송하기

send message in FIFO Queue 선입선출 대기열에 메시지 전송하기
Input
필드
타입
설명
QueueURL
String
메시지를 보낼 Queue을 입력합니다. Enter target Queue which you want to send message
messageBody
String
메시지 Body에 들어갈 내용을 입력합니다. Enter message's content which is in body
MessageGroupId
String
메시지 그룹 Id를 입력합니다. Enter message's group Id
MessageDeduplicationId
String
메시지 중복 방지를 위한 Id를 입력합니다. Enter Id which prevent message to be duplicated
DelaySeconds
Number
메시지 전송 지연 시간(초)을 입력합니다. Enter delayed time(second) to send message
messageAttribute_n
String
메시지의 속성 이름을 입력합니다. 속성은 최대 3개까지 사용할 수 있습니다. Enter message's attribute. you can use 3 attribute in this plugin
DataType_n
String
n번째 속성의 데이터 타입을 선택합니다. Choose data type of #n attribute
StringValue_n
String
n번째 속성에 들어갈 값을 입력합니다. Enter the value of attribute #n
return
필드
타입
설명
messageId
String
전송에 성공한 메시지의 Id 값을 반환합니다. Return Id of message which is success to send message
statuss
String
해당 액션의 상태 값을 반환합니다. 성공 시에 ‘success’를, 실패 시에 ‘fail’을 반환합니다. return the action’s state. If success, return ‘success. Otherwise, return ‘fail’
error
Number
실패 시, 에러 값을 반환합니다. return the error’s message when this action is failed
///success { "messageId": "04c0cd3b-5eb7-413b-9cd9-811ca08b0625", "status": "success", "error": null } ///fail { "status": "fail", "error": "%{error.message}" }
JavaScript
복사

c. receive message from standard Queue 표준형 대기열에서 메시지 불러오기

표준형 대기열에 있는 메시지를 조회합니다. 필요한 경우, 삭제할 수도 있습니다. receive message from standard Queue. If necessary, delete this
Input
필드
타입
설명
QueueURL
String
메시지를 불러올 Queue을 입력합니다. Enter target Queue which you want to receive message
MaxNumberOfMessages
Number
한 번에 불러올 메시지 갯수를 입력합니다. 최대 10개까지 가능합니다. Enter the number of received message. The max is 10
VisibilityTimeout
Number
메시지를 받아온 후 해당 메시지를 처리 중으로 표시하여 다른 수신자가 해당 메시지를 보지 못하도록 하는 시간을 입력합니다. 즉, 메시지를 받아온 클라이언트가 메시지를 처리하는 동안에는 다른 클라이언트가 해당 메시지를 보지 못하도록 합니다. Enter the time to mark the message as being processed after it has been received, preventing other recipients from seeing it. In other words, while the client that received the message is processing it, other clients cannot see the message.
WaitTimeSeconds
Number
메시지를 받아올 때 대기할 최대 시간(초)을 입력합니다. 최대 20초까지 가능합니다. 클라이언트가 메시지를 요청하면 SQS는 메시지가 대기열에 없을 때까지 대기하며, 이 때 대기 시간은 해당 값에 따라 결정됩니다. Enter the maximum time(second) to wait when receiving messages. The max is 20. When a client requests messages, SQS waits until messages are available in the queue, and the wait time is determined by this value.
MessageAttributes_n
String
메시지에서 속성 값을 읽고 싶을 경우, 해당 속성의 이름을 입력합니다. If you want to read attribute values fr메시지에서 속성 값을 읽고 싶을 경우, 해당 속성의 이름을 입력합니다. 최대 3개의 속성을 읽을 수 있습니다. If you want to read attribute values from the message, enter the name of the attribute. It can read max 3 attributeom the message, enter the name of the attribute
IsDelete
Boolean
메시지를 조회한 후, 대기열에서 삭제하고 싶다면 체크합니다. If you want to delete message which you have read, set "Yes"
return
필드
타입
설명
status
String
해당 액션의 상태 값을 반환합니다. 성공 시에 ‘success’를, 실패 시에 ‘fail’을 반환합니다. return the action’s state. If success, return ‘success. Otherwise, return ‘fail’
error
Number
실패 시, 에러 값을 반환합니다. return the error’s message when this action is failed
messageIds
List of String
불러온 메시지의 id 값을 리스트 형식으로 반환합니다. Return list of received message’s Id
ReceiptHandles
List of String
불러온 메시지의 ReceiptHandels 값을 리스트 형식으로 반환합니다. Return list of received message’s ReceiptHandles
bodys
List of String
불러온 메시지의 body 값을 리스트 형식으로 반환합니다. Return list of received message’s body
messageAttributes_1
List of String
불러온 메시지의 첫 번째 속성 값을 리스트 형식으로 반환합니다. Return list of first value in received message
messageAttributes_2
List of String
불러온 메시지의 두 번째 속성 값을 리스트 형식으로 반환합니다. Return list of second value in received message
messageAttributes_3
List of String
불러온 메시지의 세 번째 속성 값을 리스트 형식으로 반환합니다. Return list of third value in received message
isDelete
Boolean
불러온 메시지를 삭제했는지 아니면 보존했는지를 보여줍니다. 삭제했을 시, “true’를 반환합니다. Return whether the received messages is deleted or not. If deleting, return “true”
///success { "status": "success", "messageIds": [ "bdd2cdd5-97f7-45ff-afc0-5ecb88c28e5b" ], "ReceiptHandles": [ "AQEBUftjv8b6luzK/zllSXznU7NvngcK5fBRhqYOyLxbI7HkRHsb3PXMR3g7GkWnuLxUsI67TWN3vQ5zdssZGFuC5SmjOSsIB68nJRBj62Gsr1jkB+cJVpW4w6SwWE21gxMpH+GbR4TtdwSBkcXgaOBbcETvs8z2o9UhHl2PUClo64pQZ0Yj/rBETSnMr7WEm8GqZIHZVwfTqEw7VhqI7Rpy7TnNg9wf/oxlZQW3+Ivm/Q8n2qnxCRhV8kR4Pe2vndYwExQUqMEHzBP+NSf2LiMZrH3scSt5LR7RI42qktTPbBaHK+NiAWdmo3jwL7WoG8FiWK/RBrL7ViNkSGxNp2xEiA+2Ljcyn7bgaBYFJfxq8Ls4dnw8Sa0Cj5AqOLTSFMRSq5SOuaHEeLGNJJ0ROJ6ZJw==" ], "error": null, "bodys": [ "Hello I am bubblebox" ], "messageAttributes_1": [ This is first attribute value ], "messageAttributes_2": [ "2023" ], "messageAttributes_3": [ null ], "isDelete": false } ///fail { "status": "fail", "messageIds": null, "ReceiptHandles": null, "error": "%{error.message}", "bodys": null, "messageAttributes_1": null, "messageAttributes_2": null, "messageAttributes_3": null, "isDelete": false }
JavaScript
복사

d. receive message from FIFO Queue 선입선출 대기열에 메시지 불러오기

선입선출 대기열에 있는 메시지를 조회합니다. 필요한 경우, 삭제할 수도 있습니다. receive message from fifo Queue. If necessary, delete this
Input
필드
타입
설명
QueueURL
String
메시지를 불러올 Queue을 입력합니다. Enter target Queue which you want to receive message
MaxNumberOfMessages
Number
한 번에 불러올 메시지 갯수를 입력합니다. 최대 10개까지 가능합니다. Enter the number of received message. The max is 10
VisibilityTimeout
Number
메시지를 받아온 후 해당 메시지를 처리 중으로 표시하여 다른 수신자가 해당 메시지를 보지 못하도록 하는 시간을 입력합니다. 즉, 메시지를 받아온 클라이언트가 메시지를 처리하는 동안에는 다른 클라이언트가 해당 메시지를 보지 못하도록 합니다. Enter the time to mark the message as being processed after it has been received, preventing other recipients from seeing it. In other words, while the client that received the message is processing it, other clients cannot see the message.
WaitTimeSeconds
Number
메시지를 받아올 때 대기할 최대 시간(초)을 입력합니다. 최대 20초까지 가능합니다. 클라이언트가 메시지를 요청하면 SQS는 메시지가 대기열에 없을 때까지 대기하며, 이 때 대기 시간은 해당 값에 따라 결정됩니다. Enter the maximum time(second) to wait when receiving messages. The max is 20. When a client requests messages, SQS waits until messages are available in the queue, and the wait time is determined by this value.
MessageAttributes_n
String
메시지에서 속성 값을 읽고 싶을 경우, 해당 속성의 이름을 입력합니다. If you want to read attribute values fr메시지에서 속성 값을 읽고 싶을 경우, 해당 속성의 이름을 입력합니다. 최대 3개의 속성을 읽을 수 있습니다. If you want to read attribute values from the message, enter the name of the attribute. It can read max 3 attributeom the message, enter the name of the attribute
IsDelete
Boolean
메시지를 조회한 후, 대기열에서 삭제하고 싶다면 체크합니다. If you want to delete message which you have read, set "Yes"
return
필드
타입
설명
status
String
해당 액션의 상태 값을 반환합니다. 성공 시에 ‘success’를, 실패 시에 ‘fail’을 반환합니다. return the action’s state. If success, return ‘success. Otherwise, return ‘fail’
error
Number
실패 시, 에러 값을 반환합니다. return the error’s message when this action is failed
messageIds
List of String
불러온 메시지의 id 값을 리스트 형식으로 반환합니다. Return list of received message’s Id
ReceiptHandles
List of String
불러온 메시지의 ReceiptHandels 값을 리스트 형식으로 반환합니다. Return list of received message’s ReceiptHandles
bodys
List of String
불러온 메시지의 body 값을 리스트 형식으로 반환합니다. Return list of received message’s body
messageAttributes_1
List of String
불러온 메시지의 첫 번째 속성 값을 리스트 형식으로 반환합니다. Return list of first value in received message
messageAttributes_2
List of String
불러온 메시지의 두 번째 속성 값을 리스트 형식으로 반환합니다. Return list of second value in received message
messageAttributes_3
List of String
불러온 메시지의 세 번째 속성 값을 리스트 형식으로 반환합니다. Return list of third value in received message
isDelete
Boolean
불러온 메시지를 삭제했는지 아니면 보존했는지를 보여줍니다. 삭제했을 시, “true’를 반환합니다. Return whether the received messages is deleted or not. If deleting, return “true”
///success { "status": "success", "messageIds": [ "04c0cd3b-5eb7-413b-9cd9-811ca08b0625" ], "ReceiptHandles": [ "AQEBo4K02hL1lU1MPGrmf+VqBFvHwsDqKza9ibtL7y1QIt51nLp+iWMyJqbouQnO1wOdJoa2VgwWWgZiDTXXMak1MZYrCIYphAmLkHdufDvj0cNWq7iBulgHV/ptk72Nd4tbFX6IxE63NltMpmgikcqskD/bxYzojPFhlK7164hs4MaJicy9btFgDoC/zXYSg8JB2i+AewBLN3rb4KJdmcepPTkHBrAOcnNBiB/WVk0q4pT63Weq8KDpzM4zzP8DbKO0IxxJ5TF6Rgb+/MlG+lMh4cYarpUpvtI2eAAFRtZ8N0A=" ], "error": null, "bodys": [ "Hello I am bubblebox" ], "messageAttributes_1": [ "This is first attribute value" ], "messageAttributes_2": [ "2023" ], "messageAttributes_3": [ null ], "isDelete": false } ///fail { "status": "fail", "messageIds": null, "ReceiptHandles": null, "error": "%{error.message}", "bodys": null, "messageAttributes_1": null, "messageAttributes_2": null, "messageAttributes_3": null, "isDelete": false }
JavaScript
복사

Tutorial (튜토리얼)

1. Create IAM User account

AWS IAM에 들어가서, SQS 권한을 부여할 IAM 계정을 생성해야 합니다. 아래 링크를 들어가서 [액세스 관리] 탭 내의 [사용자] 탭에서 새로운 사용자를 생성합니다.
Go to AWS IAM and create an IAM account to grant SQS permissions. Navigate to the [Users] tab within the [Access management] tab in the link below to create a new user
생성한 사용자 계정에 정책을 연결합니다. [직접 정책 연결]을 클릭하고, “AmazonSQSFullAccess”를 검색해 정책을 해당 계정에 연결합니다.
After creating the user account, associate a policy with the user. Click on [Attach policies directly] and search for 'AmazonSQSFullAccess' policy to link it to the account.
생성한 사용자 계정에 들어간 후, [액세스 키 만들기]를 클릭해 API 키를 발급합니다. (1) 발급한 키를 기록하고 (2) ARN을 클릭해 복사합니다. 해당 정보는 이후에도 계속 사용해야 합니다.
After accessing the user account, click on "Create access key" to generate an API key. (1) Record the issued key and (2) click on ARN to copy it. This information will be required for future use.

2. Enter API Key in Bubble

버블의 에디터 페이지에서 [플러그인] 탭으로 이동하고, 다운 받은 플러그인에 앞서 발급한 API 키를 입력합니다.
In the Bubble editor page, navigate to the "Plugins" tab and access the downloaded plugin. Enter the API key issued earlier in the appropriate field.

3. Create Queue

이제 AWS SQS로 이동해 Queue를 생성합니다.
Now, navigate to AWS SQS to create a queue.
Queue 타입은 (1) 기본형과 (2) 선입선출형이 있습니다. 자신의 상황에 맞춰 선택합니다.
There are two types of queues available: (1) Standard Queue and (2) FIFO Queue. Choose the queue type based on your requirements.
[액세스 정책] 섹션에서 앞서 메시지를 전송할 수 있는 사용자와 수신할 수 있는 사용자에 [지정된 AWS 계정, IAM 사용자 및 역할만]을 선택하고, 이전 단계에서 생성한 IAM 계정의 ARN을 입력합니다.
In the "Access Policy" section, for both sending and receiving messages, select "[Only the specified AWS accounts, IAM users, and roles]" and enter the ARN of the IAM account created in the previous step.

4. Copy and Paste Queue URL

생성한 Queue에서 URL 복사 아이콘을 클릭합니다. 이렇게 복사한 Queue URL은 모든 액션 이벤트에서 사용됩니다.
Click on the copy URL icon for the created queue. The copied queue URL will be used in all action events.
플러그인의 액션 이벤트를 생성하면 [QueueURL] 필드가 있습니다. 여기에 복사한 값을 붙여넣습니다.
When creating an action event in the plugin, you'll find a field labeled [QueueURL]. Paste the copied value into this field.

5. Send Message to Queue

메시지를 보내려는 큐가 기본형이라면 ‘sendMessage_standard”를, 선입선출형이라면 ‘sendMessage_fifo”를 사용합니다.
If you are sending a message to a standard queue, use "sendMessage_standard". If it's a FIFO queue, use "sendMessage_fifo".
모든 메시지 전송 액션 이벤트는 최대 3개의 메시지 속성을 전송할 수 있습니다. 속성을 전송할 때, (1) messageAttribute와 (2) DataType, (3) StringValue 값이 필요합니다. [messageAtrribute] 필드에는 속성의 이름을, [DataType] 필드에는 속성의 데이터 타입을, [StringValue] 필드에는 속성 값을 입력합니다.
Every message transmission action event can transmit up to 3 message attributes. When sending attributes, you need (1) messageAttribute, (2) DataType, and (3) StringValue values. In the [messageAttribute] field, enter the name of the attribute, in the [DataType] field, enter the data type of the attribute, and in the [StringValue] field, enter the value of the attribute.
선입선출형 큐에 메시지를 보내는 경우, 메시지 그룹 Id와 메시지 중복 id를 추가적으로 입력해야 합니다. When sending messages to a FIFO queue, you need to additionally transmit the message group ID and message deduplication ID.

6. Receive Message from Queue

큐에서 메시지를 읽을 때, [MaxNumberOfMessage], [VisibilityTimeOut], [WaitTimeSeconds] 필드를 입력해야 합니다.
When reading messages from the queue, you need to specify the [MaxNumberOfMessage], [VisibilityTimeOut], and [WaitTimeSeconds] fields.
큐에서 한 번 조회할 때, 읽어올 최대 메시지 갯수를 MaxNumberOfMessage로 정의합니다. 이때, 최대 10개의 메시지까지 불러올 수 있습니다. 간혹 Queue에 저장된 메시지가 적다면, 10개를 설정해도 10개보다 적은 메시지가 조회될 수 있습니다.
MaxNumberOfMessage: Defines the maximum number of messages to retrieve in a single request from the queue. You can retrieve up to 10 messages at a time. If there are fewer messages in the queue than the specified maximum, you may receive fewer messages.
VisibilityTimeout은 메시지를 받아온 클라이언트가 해당 메시지를 처리하는 동안에는 다른 클라이언트가 해당 메시지를 보지 못하도록 설정하는 시간입니다. 이는 메시지를 처리 중인 동안에는 해당 메시지가 대기열에서 보이지 않도록 하여 다른 클라이언트가 동일한 메시지를 동시에 처리하지 못하도록 합니다.
VisibilityTimeout: Sets the duration during which a message received by a client will be invisible to other clients while being processed. This prevents other clients from seeing the message in the queue while it's being processed, ensuring that the same message is not processed simultaneously by multiple clients.
WaitTimeSeconds는 메시지를 요청한 후에 SQS가 메시지가 대기열에 없을 때까지 대기하는 최대 시간을 설정합니다. 이 값은 폴링 기간으로, 클라이언트가 메시지를 요청하면 SQS는 해당 값에 따라 메시지가 대기열에 나타날 때까지 대기합니다. 최대값은 20초입니다. 이를 통해 메시지가 대기열에 즉시 나타나지 않더라도, 일정 시간 동안 기다림으로써 메시지를 즉시 처리할 수 있도록 합니다.
WaitTimeSeconds: Sets the maximum time that SQS will wait for messages to appear in the queue after a request for messages is made. This value represents the polling period, during which SQS waits for messages to become available in the queue. The maximum value is 20 seconds. It allows immediate processing of messages even if they are not immediately available in the queue by waiting for a specified period.
만약 메시지를 불러올 때, 확인해야 하는 속성이 있다면 [MessageAttribute] 필드를 이용합니다. 해당 필드에 읽어 올 속성의 이름을 입력하며, 최대 3개까지 읽을 수 있습니다.
If there are attributes that need to be checked when retrieving messages, you can use the [MessageAttribute] field. Enter the names of the attributes to be retrieved in this field, and you can read up to a maximum of three attributes.
불러올 메시지를 큐에서 삭제하고 싶다면, [isDelete]를 활성화 합니다.
If you want to delete the messages retrieved from the queue, you can activate the [isDelete] option.
후원 받은 커피는 더 많은 플러그인과 자료를 만드는 원동력이 됩니다.
버블박스 l BubbleBox
Premium