Posts

Showing posts from May, 2020

AWS Serverless lambda

Serverless basically means uploading of your code/lambda functions on AWS. In my case, I wrote a simple lambda first. https://github.com/rahuljain81/Node.Js/blob/master/serverless/serverless-app.js For using serverless, yml file is required. https://github.com/rahuljain81/Node.Js/blob/master/serverless/serverless.yml -------------------------------------------- service: serverless-app provider:   name: aws   runtime: nodejs12.x   stage: dev   region: ap-south-1   memorySize: 128 functions:   helloOne: <-----lambda function name     handler: serverless-app.handler <----------format:<module>.<handler>     events:        - http:            path: /           method: ANY           cors: true       - http:            path: /{proxy+}           method: ANY ...

ESP8266 + AWS IoT (Certificates Accessed using FS)

Code: https://github.com/rahuljain81/ESP8266_Arduino/tree/master/aws_iot_fs Data folder is required for storing AWS Certificates.  Certificates are accessed using esp8266fs-plugin // Load certificate file File cert = SPIFFS.open("/fcb29a4f29-certificate.pem.crt", "r"); //replace cert.crt eith your uploaded file name if (!cert) {   Serial.println("Failed to open cert file"); } else   Serial.println("Success to open cert file"); delay(1000); if (espClient.loadCertificate(cert))   Serial.println("cert loaded"); else   Serial.println("cert not loaded"); // Load private key file File private_key = SPIFFS.open("/fcb29a4f29-private.pem.key", "r"); //replace private eith your uploaded file name if (!private_key) {   Serial.println("Failed to open private cert file"); } else   Serial.println("Success to open private cert file"); delay(1000); if (espClient.loadPrivateKey(private_key)) Serial.print...

Interaction ESP8266 + AWS IoT + DynamoDB

Followed Instructions: https://electronicsinnovation.com/storing-esp8266-data-into-amazon-dynamodb-using-aws-iot-coremqtt-arduino/ Code: https://github.com/rahuljain81/ESP8266_Arduino/tree/master/aws_iot_fs_dynamodb