aws-lambda

How can I get Alexa working on my iOS app?

断了今生、忘了曾经 提交于 2020-01-13 04:54:06
问题 I have been checking out the Alexa Skills kit the past few days. I have also been poring through the documentations for both the Skills kit and the Voice Service. I am just having a little hiccup trying to understand the flow. I have implemented one of amazon's sample skills (favourite colour sample) in the developer console and also wrote a sample lambda function to handle the type of response that will be delivered. Its working on the test simulator and what left is basically getting lambda

Are AWS S3 Event Notifications guaranteed to be delivered?

心已入冬 提交于 2020-01-12 21:54:59
问题 I'm hooking up AWS S3 event notifications to an AWS Lambda processing pipeline. I can't find documentation on S3 event notification guarantees. Can I be sure all S3 events will fire the lambda processes? Order does not concern me, just that my lambda eventually does get fired. If no such guarantee exists, how to architect to deal with this? 回答1: In principle yes. However, Lambda has a 99.9% SLA and S3 has a 99.9% uptime SLA as well. So in theory some events could be missed, but only when they

How to debug aws lambda functions written in node js

北城以北 提交于 2020-01-12 14:31:36
问题 We have been developing AWS Lambda functions in Node JS for a few months. Can we debug, i.e. step through the Node JS code as we can with .Net C# code in Visual Studio? 回答1: IDE-based development tools are not available by default for many Lambda functions. There are some plugins, such as the Visual Studio support introduced by AWS on their blog at https://aws.amazon.com/blogs/developer/aws-lambda-support-in-visual-studio/, but these will have varying levels of feature sets and support. In

DynamoDB: UpdateItem, Ignore Null values in ExpressionAttributeValues

独自空忆成欢 提交于 2020-01-12 10:33:54
问题 I'm using DynamoDB UpdateItem to update records in my DB. A basic function like this is working for me. var user = { userID: '123213', name: 'John Doe', age: 12, type: 'creator' }; var params = { TableName:table, Key:{ "UserID": user.userID }, UpdateExpression: "set Name = :r, Age=:p, Type=:a", ExpressionAttributeValues:{ ":r":user.name, ":p":user.age, ":a":user.type }, ReturnValues:"UPDATED_NEW" }; docClient.update(params, function(err, data) { if (err) { console.error("Unable to update item

CodePipeline: CodeDeploy reports “BundleType must be either YAML or JSON”

此生再无相见时 提交于 2020-01-12 09:31:24
问题 buildspec.yml: version: 0.2 phases: build: commands: - echo Build started on `date` - echo Compiling the Python code... - python HelloWorld_tst.py post_build: commands: - echo Build completed on `date` artifacts: files: - HelloWorld.py - appspec.yml discard-paths: yes appspec.yml version: 0.0 Resources: - autovisionfunction: Type: AWS::Lambda::Function Properties: Name: "autovisionfunction" Alias: "staging" CurrentVersion: "1" TargetVersion: "2" Seems while in CodePipeline can't find appspec

CodePipeline: CodeDeploy reports “BundleType must be either YAML or JSON”

我是研究僧i 提交于 2020-01-12 09:29:02
问题 buildspec.yml: version: 0.2 phases: build: commands: - echo Build started on `date` - echo Compiling the Python code... - python HelloWorld_tst.py post_build: commands: - echo Build completed on `date` artifacts: files: - HelloWorld.py - appspec.yml discard-paths: yes appspec.yml version: 0.0 Resources: - autovisionfunction: Type: AWS::Lambda::Function Properties: Name: "autovisionfunction" Alias: "staging" CurrentVersion: "1" TargetVersion: "2" Seems while in CodePipeline can't find appspec

using lambda functions to unzip archives in S3 is really sloooooow

馋奶兔 提交于 2020-01-12 03:42:10
问题 My company is uploading large archive files to S3, and now wants them to be unzipped on S3. I wrote a lambda function based on unzip, triggered by arrival of a file to the xxx-zip bucket, which streams the zip file from S3, unzips the stream, and then streams the individual files to the xxx-data bucket. It works, but I find it is much slower than I expect - even on a test file, zip size about 500k and holding around 500 files, this is timing out with a 60 second timeout set. Does this seem

multiple images upload in s3 bucket using nodejs in aws lambda?

杀马特。学长 韩版系。学妹 提交于 2020-01-11 13:50:27
问题 I am using AWS lambda function and nodejs. I tried to insert multiple images in s3 bucket. find the below for your reference. var AWS = require('aws-sdk'); var fileType = require('file-type'); var bucket = 'testing'; var s3 = new AWS.S3(); exports.handler = (event, context, callback) => { var Userid = event['userid']; var media = event['media']; media.forEach(function(eachrecord){ var fileBuffer = Buffer.from(eachrecord, 'base64'); var fileTypeInfo = fileType(fileBuffer); var randomstring =

How custom role(of Lambda) works with EC2 role policy?

白昼怎懂夜的黑 提交于 2020-01-11 11:18:13
问题 Below is the custom execution role( some-role-serv-LogicalID-GDGGGGGBMW2 ) created for lambda function( AWS::Serverless::Function ) written using SAM template: { "permissionsBoundary": { "permissionsBoundaryArn": "arn:aws:iam::111222333444:policy/some-permission-boundary", "permissionsBoundaryType": "Policy" }, "roleName": “some-role-serv-LogicalID-GDGGGGGBMW2”, "policies": [ { "document": { "Version": "2012-10-17", "Statement": [ { "Action": "sqs:*", "Resource": "arn:aws:sqs:us-east-1

How custom role(of Lambda) works with EC2 role policy?

谁说我不能喝 提交于 2020-01-11 11:18:11
问题 Below is the custom execution role( some-role-serv-LogicalID-GDGGGGGBMW2 ) created for lambda function( AWS::Serverless::Function ) written using SAM template: { "permissionsBoundary": { "permissionsBoundaryArn": "arn:aws:iam::111222333444:policy/some-permission-boundary", "permissionsBoundaryType": "Policy" }, "roleName": “some-role-serv-LogicalID-GDGGGGGBMW2”, "policies": [ { "document": { "Version": "2012-10-17", "Statement": [ { "Action": "sqs:*", "Resource": "arn:aws:sqs:us-east-1