aws chat (back)

AWS Chat

(1a) Web test websocket

 https://websocketking.com/

(1b) Create HTML/JS document and deploy to S3: websocket

 HMTL/JS micro-project to send WS

(2) AWS API Gateway and Lambdas

 link to chat

AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers. You can trigger Lambda from over 200 AWS services and software-as-a-service (SaaS) applications and only pay for what you use. 


Official documentation

Run a Serverless "Hello, World!" with AWS Lambda

Ejecutar un programa “Hello, World!” sin servidor


ber careful with the chosen version, with NosdeJS as a server:

(3) AWS DynamoDB

link to chat

AWS DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-Region replication, in-memory caching, and data import and export tools. 

DynamoDB supports two types of primary keys:

(4) AWS IAM Permissions

Lambda > Configuration > Permissions > Execution Role

{

    "Version": "2012-10-17",

    "Statement": [

        {

            "Sid": "DynamoDBIndexAndStreamAccess",

            "Effect": "Allow",

            "Action": [

                "dynamodb:GetShardIterator",

                "dynamodb:Scan",

                "dynamodb:Query",

                "dynamodb:DescribeStream",

                "dynamodb:GetRecords",

                "dynamodb:ListStreams"

            ],

            "Resource": [

                "arn:aws:dynamodb:eu-central-1:591234567896:table/_masterTableUser/index/*",

                "arn:aws:dynamodb:eu-central-1:591234567896:table/_masterTableUser/stream/*"

            ]

        },

        {

            "Sid": "DynamoDBTableAccess",

            "Effect": "Allow",

            "Action": [

                "dynamodb:BatchGetItem",

                "dynamodb:BatchWriteItem",

                "dynamodb:ConditionCheckItem",

                "dynamodb:PutItem",

                "dynamodb:DescribeTable",

                "dynamodb:DeleteItem",

                "dynamodb:GetItem",

                "dynamodb:Scan",

                "dynamodb:Query",

                "dynamodb:UpdateItem"

            ],

            "Resource": "arn:aws:dynamodb:eu-central-1:591234567896:table/_masterTableUser"

        },

        {

            "Sid": "DynamoDBDescribeLimitsAccess",

            "Effect": "Allow",

            "Action": "dynamodb:DescribeLimits",

            "Resource": [

                "arn:aws:dynamodb:eu-central-1:591234567896:table/_masterTableUser",

                "arn:aws:dynamodb:eu-central-1:591234567896:table/_masterTableUser/index/*"

            ]

        }

    ]

}

(5) AWS Billing Console