Instructions for setting up Sender and Receiver Application in Amazon Web Service Elastic Beanstalk and making those two applications communicate using Simple Queue Service .
Instructions are divided as follows,
- Create AWS Credentials
- Create an SQS Queue
- Setting up Java Receiver
- Setting up NodeJs Sender
Navigate to Security Credentials Page. Click Users Tab.
Click on Create New Users, and type in the user name
You will be prompted with an Access Key Id and Secret Access Key. We will be using these keys in our sender and receiver application.
Adding Permission.
Choosing options.
Your Queue
URL
will be available in the details tab. We will be using thisURL
for communication.
Download Receiver.war file here. We need to make changes to the following files for setting up Receiver in Tomcat. Make these changes in the Receiver.war file without extracting.
AWSCredentials.properties
- Provide the AWS Credentials (Access Key Id and Secret Access Key)whoami.txt
- Enter your name and Bits IDweb.xml
- Provide the QueueURL
Navigate to Elastic Beanstalk.
Provide a name for the application.
Create a new Web Server.
Choose a default profile.
Choose an enviroment type.
Upload your zip file.
Provide an environment URL.
Click on launch to launch your enviroment and be patient as it takes some time to initialize the environment.
We need to make changes to the following files for setting up NodeJs
aws.credentials.json
- Provide the AWS Credentials (Access Key Id and Secret Access Key)whoami.txt
- Enter your name and Bits IDsqsendpointdetails.txt
- Provide the QueueURL
Make sure you are compressing the 5 files without placing it in a folder. In case there is a folder named node_modules
delete it before uploading.
Follow the same steps similar to the previous application till choosing an environment
Follow the steps as specified for the previous application