aws-lambda

How to send SMS using Amazon SNS from a AWS lambda function

时间秒杀一切 提交于 2021-01-01 06:14:18
问题 Amazon SNS provides a facility to send SMS globally. I want to send SMS from a Lambda function were we provide the mobile number and text message and use SNS to deliver that message but I didn't find a helpful documentation or example code for NodeJS or java. Can any one suggest a solution? Code: var params = { Message: 'Hi this is message from AWS_SNS', /* required */ MessageAttributes: { someKey: { DataType: 'String' , StringValue: 'String' }, }, MessageStructure: 'String', PhoneNumber: '

Publishing message from AWS Lambda to AWS IoT

偶尔善良 提交于 2021-01-01 03:38:40
问题 I am trying to publish message from AWS Lamba using Nodejs to AWS IoT . I have zipped the project and uploaded on to the AWS IoT below is the code snippet var awsIot = require('aws-iot-device-sdk'); var device = awsIot.device({ keyPath: 'keyfilepath', certPath: 'pem file path', caPath: 'root-CA.crt', clientId: 'iotTest7526532135', host: 'host id' }); device .on('connect', function() { console.log('connect'); device.subscribe('topic_3'); device.publish('topic_1', JSON.stringify({ message_id:23

Publishing message from AWS Lambda to AWS IoT

▼魔方 西西 提交于 2021-01-01 03:34:34
问题 I am trying to publish message from AWS Lamba using Nodejs to AWS IoT . I have zipped the project and uploaded on to the AWS IoT below is the code snippet var awsIot = require('aws-iot-device-sdk'); var device = awsIot.device({ keyPath: 'keyfilepath', certPath: 'pem file path', caPath: 'root-CA.crt', clientId: 'iotTest7526532135', host: 'host id' }); device .on('connect', function() { console.log('connect'); device.subscribe('topic_3'); device.publish('topic_1', JSON.stringify({ message_id:23

AWS Lambda: unable to delete arn because it is a replicated function

送分小仙女□ 提交于 2020-12-31 06:22:24
问题 I'm trying to delete an AWS Lambda function through the GUI, but am getting a response: There was an error deleting your function: Lambda was unable to delete arn:aws:lambda:us-east-1:624929674184:function:lambda-auth:1 because it is a replicated function. How can one delete replicated Lambda functions? 回答1: Replicated functions are something Lambda@Edge uses, so I assume that's the case here even though it's not stated. You should review this document on how to delete these. You can't

AWS Lambda: unable to delete arn because it is a replicated function

拟墨画扇 提交于 2020-12-31 06:18:50
问题 I'm trying to delete an AWS Lambda function through the GUI, but am getting a response: There was an error deleting your function: Lambda was unable to delete arn:aws:lambda:us-east-1:624929674184:function:lambda-auth:1 because it is a replicated function. How can one delete replicated Lambda functions? 回答1: Replicated functions are something Lambda@Edge uses, so I assume that's the case here even though it's not stated. You should review this document on how to delete these. You can't

“SSL: CERTIFICATE_VERIFY_FAILED” Error when publish MQTT, AWS IoT

情到浓时终转凉″ 提交于 2020-12-31 05:38:31
问题 I am getting the following error: [ERROR] SSLError: SSL validation failed for https://data.iot.ap-northeast-2.amazonaws.com/topics/app%2Ftest%2Fresponse?qos=1 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124) Traceback (most recent call last): File "/var/task/app.py", line 197, in lambda_handler mqttcli.test('test', '11111', {}, 1, 200) File "/opt/python/lib/python3.8/site-packages/connectors/MQTTClient.py", line 40, in test

Call AWS Lambda from Aurora RDS Stored Procedure Permissions Issue

谁都会走 提交于 2020-12-30 03:19:34
问题 I've created a few Lambdas in AWS, and an Aurora RDS (publicly available). I couldn't execute lambdas (via call mysql.lambda_async ). When I tried that I got the error ERROR 1873: 1873: Lambda API returned error: Missing Credentials: Cannot instantiate Lambda Client . I tried attaching an IAM role called aurora-lambdas where I set full access to RDS and Lambdas and a trusted relationship between those services, but after trying various configurations I still get the issue. Do someone have

Call AWS Lambda from Aurora RDS Stored Procedure Permissions Issue

有些话、适合烂在心里 提交于 2020-12-30 03:13:50
问题 I've created a few Lambdas in AWS, and an Aurora RDS (publicly available). I couldn't execute lambdas (via call mysql.lambda_async ). When I tried that I got the error ERROR 1873: 1873: Lambda API returned error: Missing Credentials: Cannot instantiate Lambda Client . I tried attaching an IAM role called aurora-lambdas where I set full access to RDS and Lambdas and a trusted relationship between those services, but after trying various configurations I still get the issue. Do someone have

Call AWS Lambda from Aurora RDS Stored Procedure Permissions Issue

房东的猫 提交于 2020-12-30 03:13:39
问题 I've created a few Lambdas in AWS, and an Aurora RDS (publicly available). I couldn't execute lambdas (via call mysql.lambda_async ). When I tried that I got the error ERROR 1873: 1873: Lambda API returned error: Missing Credentials: Cannot instantiate Lambda Client . I tried attaching an IAM role called aurora-lambdas where I set full access to RDS and Lambdas and a trusted relationship between those services, but after trying various configurations I still get the issue. Do someone have

Call AWS Lambda from Aurora RDS Stored Procedure Permissions Issue

大兔子大兔子 提交于 2020-12-30 03:13:17
问题 I've created a few Lambdas in AWS, and an Aurora RDS (publicly available). I couldn't execute lambdas (via call mysql.lambda_async ). When I tried that I got the error ERROR 1873: 1873: Lambda API returned error: Missing Credentials: Cannot instantiate Lambda Client . I tried attaching an IAM role called aurora-lambdas where I set full access to RDS and Lambdas and a trusted relationship between those services, but after trying various configurations I still get the issue. Do someone have