aws-lambda

aws lambda django app deployed with zappa - python import precendecy

耗尽温柔 提交于 2020-03-20 05:58:07
问题 We have a Django application we deploy on AWS Lambda, using Zappa. We use pipenv to manage python packages of the project. Some packages we use (e.g cryptography) need to be compiled with the same configration as the lambda machine. To do that, I've generated wheels for those packages on a similar machine, and included them in a sub folder in the directory. So here is our deployment process now: install packages with pipenv (which also includes those special packages) extract precompiled

aws lambda django app deployed with zappa - python import precendecy

假装没事ソ 提交于 2020-03-20 05:58:04
问题 We have a Django application we deploy on AWS Lambda, using Zappa. We use pipenv to manage python packages of the project. Some packages we use (e.g cryptography) need to be compiled with the same configration as the lambda machine. To do that, I've generated wheels for those packages on a similar machine, and included them in a sub folder in the directory. So here is our deployment process now: install packages with pipenv (which also includes those special packages) extract precompiled

Fargate vs Lambda, when to use which?

半世苍凉 提交于 2020-03-13 07:01:07
问题 I'm pretty new to the whole Serverless landscape, and am trying to wrap my head around when to use Fargate vs Lambda. I am aware that Fargate is a serverless subset of ECS, and Lambda is serverless as well but driven by events. But I'd like to be able to explain the two paradigms in simple terms to other folks that are familiar with containers but not that much with AWS and serverless. Currently we have a couple of physical servers in charge of receiving text files, parsing them out, and

Uploading image file to AWS Lambda .Net Core application from browser results in unusable file - how to fix?

穿精又带淫゛_ 提交于 2020-03-06 10:15:10
问题 I was uploading a jpg image from my browser, as a part of a form, to my .Net Core web api which resides on AWS Lambda. It uploaded but resulted in errors when I tried to process it using ImageSharp. Also I noticed that the file size of the uploaded version was almost double the size of the original. Note that there was no a problem when uploaded locally in my Windows environment running from Visual Studio 2019 Preview. It is the version that was published to AWS Lambda from Visual Studio that

AWS Step Function returns condition path references error

狂风中的少年 提交于 2020-03-05 03:33:26
问题 I am running step functions with two choices in AWS Step Functions. ... "ChoiceState": { "Type" : "Choice", "Choices": [ { "Variable": "$[0].input", "NumericEquals":1, "Next": "FirstMatchState" }, { "Variable": "$[0].input", "NumericEquals":2, "Next": "SecondMatchState" } ], "Default": "DefaultState" }, ... choice state entered with this input //ChoiceStateEntered { "name": "ChoiceState", "input": 1 } Error thrown { "error": "States.Runtime", "cause": "An error occurred while executing the

AWS SES send email lambda not sending every time

白昼怎懂夜的黑 提交于 2020-03-05 02:22:00
问题 I want to send emails using the ses from aws from lambda. The problem is that the email is only sent some times using the same code. We don't get errors. Here's the code: const AWS = require('aws-sdk'); var ses = new AWS.SES(); exports.handler = async (event, context, callback) => { context.callbackWaitsForEmptyEventLoop = false; await new Promise((resolve, reject) => { var params = { Destination: { ToAddresses: [myEmail] }, Message: { Body: { Text: { Data: "Test" } }, Subject: { Data: "Test

How to automatically put environment variable to all lambdas created in my CDK project

只谈情不闲聊 提交于 2020-03-04 19:39:50
问题 We implement almost all our lambda's in Chalice and then consume them in CDK project as described here. I need to add same environment variable to all lambda's in stack (different per developer). I would like to do it automatically, and not count on every developer adding variable to Chalice stage configuration. I can't use AWS Systems Manager Parameter Store, because it's the same for all dev stacks - we share the same AWS account. I can parse final cloudformation template before deploy and

Why do I get a UserCodeSyntaxError when I have no syntax error in my code?

核能气质少年 提交于 2020-02-28 03:09:09
问题 I'm currently creating a Dialogflow chatbot in nodejs and upon deploying my code I get an error message. I've attempted to uncomment most things out to just be left with the base functioning code and I am still unable to get it working. I'm not exactly sure what the issue is here 'use strict'; import {getAPIresponse} from "./api/index.js"; // const http = require('https'); // const respond = fulfillmentText => { // return { // statusCode: 200, // body: JSON.stringify({ // fulfillmentText // }

Triggering a Lambda function upon deleting a user on AWS Cognito User Pool

时光总嘲笑我的痴心妄想 提交于 2020-02-26 09:18:29
问题 AWS Cognito User Pools have some pre-defined events to handle user signup, confirmation etc. The full list is here. However, there is no apparent trigger for deleting a user . So, is there any way one can trigger a Lambda function when a user is deleted from Cognito User Pool (of course, with arguments like username and/or email address)? 来源: https://stackoverflow.com/questions/50876341/triggering-a-lambda-function-upon-deleting-a-user-on-aws-cognito-user-pool

Triggering a Lambda function upon deleting a user on AWS Cognito User Pool

三世轮回 提交于 2020-02-26 09:17:09
问题 AWS Cognito User Pools have some pre-defined events to handle user signup, confirmation etc. The full list is here. However, there is no apparent trigger for deleting a user . So, is there any way one can trigger a Lambda function when a user is deleted from Cognito User Pool (of course, with arguments like username and/or email address)? 来源: https://stackoverflow.com/questions/50876341/triggering-a-lambda-function-upon-deleting-a-user-on-aws-cognito-user-pool