0% found this document useful (0 votes)
5 views5 pages

SimpleMessageForum CC Assignment

Uploaded by

Mriganka Bairagi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

SimpleMessageForum CC Assignment

Uploaded by

Mriganka Bairagi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Message Forum System

Step 1: Create DynamoDB Tables

1. Navigate to DynamoDB in AWS Console.


2. Create two tables:
- Topics (Partition Key: TopicID, Attributes: TopicName, CreatedBy)
- Messages (Partition Key: MessageID, Sort Key: TopicID, Attributes: MessageContent,
PostedBy, Timestamp)
3. Enable DynamoDB Streams (optional).

Step 2: Set Up Amazon SNS

• 1. Go to SNS in AWS Console.


• 2. Create an SNS Topic (Name: ForumNotifications, Type: Standard).
• 3. Configure subscription protocols:
• - Email: Add email addresses for basic notifications.
• - Push Notifications: Integrate with Firebase Cloud Messaging (FCM).
• 4. Note the SNS Topic ARN for future use.
Step 3: Configure Firebase Cloud Messaging (FCM)

• 1. Go to Firebase Console.
• 2. Create a Firebase Project.
• 3. Obtain the Server Key (API key) for FCM.
• 4. Use this key to configure SNS for push notifications.

Step 4: Build APIs with Amazon API Gateway

• 1. Open API Gateway.


• 2. Create a REST API with endpoints:
• - POST /createTopic: Creates a new topic.
• - POST /postMessage: Posts a message to a topic.
• - GET /getMessages: Retrieves all messages for a topic.
• 3. Map these endpoints to AWS Lambda functions.

Step 5: Develop AWS Lambda Functions

• 1. Write Lambda functions for each API:


• - createTopic: Add topic details to DynamoDB and subscribe users to the SNS
topic.
• - postMessage: Store message in DynamoDB and publish a notification to the SNS
topic.
• - getMessages: Query DynamoDB for messages by TopicID.
• 2. Deploy the Lambda functions and link them to the API Gateway.

Step 7: Test and Monitor

• 1. Test end-to-end functionality:


• - Create topics and messages.
• - Verify notifications via SNS (email or FCM).
• 2. Monitor DynamoDB usage to stay within free-tier limits.
Automated SMS Notification System Using AWS Services
Step 1: S3 Bucket:

• A specific S3 bucket is configured to store files.


• You create an event notification in the S3 bucket to trigger an AWS Lambda function
whenever a new file is uploaded.

Step 2 : AWS Lambda:

• The Lambda function is triggered by the S3 event.


• This function processes the event details and sends a message via Amazon SNS.
Step 3: Amazon SNS:

• An SNS topic is created, and mobile numbers are subscribed to this topic.
• The Lambda function publishes a notification to this SNS topic, which then sends
SMS messages to all subscribers.

Step 4 : Test the Setup:

• Upload a file to the S3 bucket and check if you receive an SMS notification.

You might also like