RESTful APIs are typically used when there's no need for real-time communication, but rather just sending/receiving information periodically.
WebSockets are used when there needs to be real-time communication between the server and clients, or if data needs to be sent back and forth frequently.
A RESTful API uses HTTP methods such as GET, POST, PUT, DELETE, etc., while a WebSocket API does not use these methods.
WebSockets allow for bidirectional communication between the server and clients, making it ideal for applications where data needs to be updated frequently or in real time.
AWS Lambda allows developers to run code without provisioning or managing servers, which reduces operational overhead and costs associated with running an application on EC2 instances.
REST APIs allow for one-way requests only, whereby the client makes a request to the API.
A PUT request overwrites an existing resource or creates a resource with the same name.
A POST request is a request for a resource that is not currently available.