Configure Simple Queue Service (SQS) Events
You can manually set up an AWS SQS queue to receive integration messages using the AWS Console.
SQS supports a maximum message size of 256KiB. When some large events, usually related to an order or cart where the payload includes the cart and the order items, exceed the limit, the included resources are removed from the payload and are replaced with the following tag:
"included": {
"meta": {
"includes_elided": true
}
}
Procedure
Create a new Identity and Access Management (IAM) user group.
- Go to IAM and select User groups.
- Click Create group.
- Enter a name for your group and click Create Group.
Create a new IAM policy for the group.
Click the group name, then select the Permissions tab.
Click Add Permissions and select Create Inline Policy.
Click the JSON tab. Use the following code to paste into the editor.
noteEnsure that you change
123456789012
to your AWS account number.{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": "sqs:SendMessage",
"Resource": "arn:aws:sqs:*:123456789012:epcc*"
}]
}Click Review Policy.
Enter a name for your policy and click Create Policy.
This will create a policy and attach it to your IAM group. This policy allows a user in the group to send messages to all SQS queues in their AWS account which have a name starting with
epcc
.
Create an IAM user.
Go to Users and click Add user.
Enter a user name and select Programmatic access.
Click Next:Permissions and select the user group that you created in step 1.
Click Next:Tags.
Add any optional tags and then click Next:Review.
Review and confirm the details are correct and click Create User.
cautionAn Access Key ID and Secret Access Key is displayed for the user. Ensure that you save this information as it is only shown once and required later.
Create an SQS queue.
Go to the SQS service in the AWS console and click Create Queue.
Enter a name for the queue beginning with
epcc
.cautionThe user policy created in step 2 can only access queues with names that begin with
epcc
.Define who can send messages to the queue and enter the Amazon Resource Name (ARN) of the user created at step 3.
noteOnly specified AWS accounts, IAM users and roles can access the queue.
The ARN of the user created at step 3. You can find it in the IAM service and click on the user name. The ARN displays at the top of the summary.
Click Create Queue after you paste the ARN of the user.