- Le plus récent
- Le plus de votes
- La plupart des commentaires
AWS IoT Core allows for messages to be published over MQTT, Websockets, and HTTP. This would allow your devices to publish to the managed endpoint meaning you wouldn't have to configure any servers or services, you could just get started with using it right away. See the following for reference: https://docs.aws.amazon.com/iot/latest/developerguide/http.html
From there, testing to see if the message comes through is made very simple; the AWS IoT Console contains a test console that allows you to view incoming messages. This is very helpful when building and testing IoT applications. See the following, short video that demonstrates how to use the test console: https://youtu.be/6w9a6y_-T2o?t=299
Take a look at AWS API Gateway - https://aws.amazon.com/api-gateway/
Is your backend already implemented in AWS as an HTTPS end-point. If that's the case, API Gateway can use that backend as its integration.
If you need to implement the backend application to process the REST API calls coming from your IoT devices, you can use AWS Lambda functions (https://aws.amazon.com/lambda/). API Gateway can also directly integrate with a number of other AWS services directly as well
You can find tutorials for API Gateway here - https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-rest-tutorials.html
For authentication in API Gateway, there are multiple options available. Those are discussed at a high level - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-control-access-to-api.html
Most commonly used mechanisms are
- Lambda Authorizers - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html
- Cognito User Pools - https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html
- AWS IAM - https://docs.aws.amazon.com/apigateway/latest/developerguide/permissions.html
- Cognito Identity Pools - https://aws.amazon.com/blogs/compute/secure-api-access-with-amazon-cognito-federated-identities-amazon-cognito-user-pools-and-amazon-api-gateway/
You can use this workshop - https://auth.serverlessworkshops.io/ if you want to get a good handle on authentication with AWS API Gateway
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 4 mois
Hi Indranil,
Really appreciate your detailed response. Currently, I don't have any integrations on AWS. I'm pretty much new to AWS and Basically I'm gathering an information about the following situation:
If an IOT device sends REST messages to an endpoint using HTTPS. In order to confirm that the messages are being properly sent or can be received, how would I set a testing endpoint in AWS?
API Gateway does not have to use Lambdas or AWS Services or HTTP(S) endpoints running inside AWS as the integration. API Gateway can invoke any public HTTP(S) endpoint even if it is not running inside AWS.
Having said that, if your backend service is running outside of AWS and you just want to set up a mock inside AWS for testing purposes, you can use a mock integration to generate a hard-coded response that matches your response from the actual backend but with dummy values - https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-mock-integration.html
You can export your API swagger definition from your actual backend service and import the swagger into API Gateway to create your API definitions in API Gateway - https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-import-api.html
You can then swap the backends with mock implementations using the AWS API Gateway console