
- CREATE AN AWS SQS QUEUE USING BOTO3 UPDATE
- CREATE AN AWS SQS QUEUE USING BOTO3 SOFTWARE
- CREATE AN AWS SQS QUEUE USING BOTO3 CODE
- CREATE AN AWS SQS QUEUE USING BOTO3 TRIAL
You also learnt the coding required to publish an event / message into the event bus. This was an exercise to see how message source and content based routing can be achieved in Amazon EventBridge. Goto SQS console and you can see the message routed to the dojoqueue-source2 and dojoqueue-key2 queues.
CREATE AN AWS SQS QUEUE USING BOTO3 UPDATE
Run the following command in the console to update the environment. You will now configure the environment for the Python Boto3 SDK. It provides console based access to the development machine. Once it is ready, you can see bash console window in the bottom part of the screen. It will take couple of minutes to create the environment. On the next screen, click on the Create environment button. Keep rest of the fields with the default values and click on the Next step button. The development environment will have Ubuntu as the operating system. Select Ubuntu Server 18.04 LTS for the Platform. Select Instance type as t2.micro (1 GiB RAM + 1 vCPU). On the next screen, select Environment type as Create a new instance for environment (direct access). On the next screen, enter dojoenvironment as the name and click on the Next step button. Goto the AWS Cloud9 console and click on the Create environment button. In this task, you configure AWS Cloud9 environment with AWS SDK for Python Boto3 in order to program with Amazon EventBridge.
CREATE AN AWS SQS QUEUE USING BOTO3 SOFTWARE
The Cloud9 IDE provides the software and tooling needed for dynamic programming with around 40 languages including JavaScript, Python, PHP, Ruby, Go, and C++. First create the development environment.ĪWS Cloud9 is a cloud-based integrated development environment (IDE) from Amazon Web Services.
CREATE AN AWS SQS QUEUE USING BOTO3 CODE
Let’s build the client code which publishes the messages. The EventBridge side of the configuration is ready. It is basically looking for a message whose source name is source1. Select custom pattern option and copy-paste the following json as the event pattern. In the define pattern section, select Event pattern option. On the next screen, type in dojorule-source1 as the rule name. Goto the EventBridge Console and click on the Rules menu in the left. The source based rules route messages based on the event / message source and content based rules use message content to route message to a particular queue. In this step, you create four rules - two source based and two content based to route messages to a particular SQS queue.

Let’s configure rules for the message routing. For permissions, select Organization and then My organization and then click on the Create button. On the next screen, type in the event bus name as dojoeventbus. Then click on the Create event bus button. Goto the EventBridge Console and click on the Event buses menu in the left. The next step is to create event bus in EventBridge where the messages can be published. Let’s create the event bus where the event messages are published. Repeat steps 1 to 3 to create three more queues with names - dojoqueue-source2, dojoqueue-key1 and dojoqueue-key2. Click on the Create queue button in the bottom side of the page. Type in dojoqueue-source1 as the queue name and keep the rest of the configuration to the default. On the next screen, select Standard as type. Goto SQS Management Console and click on the Create queue button. You will see the exercise using the Ireland region. Select an AWS Region of your choice where Amazon EventBridge and Amazon Cloud9 are available. The EventBridge bus routes the event messages to Amazon SQS queues based on the source of the message and also based on the content of the message. Step2: Create SQS Queues as Routing Destinations

CREATE AN AWS SQS QUEUE USING BOTO3 TRIAL
If you don’t have an AWS account, kindly use the link to create free trial account for AWS. You need to have an AWS account with administrative access to complete the exercise. The AWS Resource consumption for the exercise does not fall under AWS Free Tier. The events published are then routed based on source and content to the different AWS SQS Queues.

In this exercise, you create a custom event bus where you publish events using Python code. The routing rules can be based on facts like event source, AWS Service and also based on the content of the message. Amazon EventBridge provides integration with custom applications, Software-as-a-Service (SaaS) applications, and AWS services. Python Programming with Amazon EventBridgeĪmazon EventBridge is a serverless event bus to enable event publishing and rules based routing to the different destinations. It is recommended to clean-up the resources as soon as you finish the exercise to minimize the cost. Important Note: You will create AWS resources during the exercise which will incur cost in your AWS account.
