serverless-architecture

AccessDeniedException: Unable to determine service/operation name to be authorized

前提是你 提交于 2021-01-21 12:15:56
问题 Using AWS CLI aws --version aws-cli/1.11.21 Python/2.7.12 Darwin/15.3.0 botocore/1.4.78 Creating a POST method for API Gateway as explained at https://github.com/arun-gupta/serverless/tree/master/aws/microservice#post-method. This method can be invoked successfully using test-invoke-method and AWS Console. Creating a GET method using AWS CLI https://github.com/arun-gupta/serverless/tree/master/aws/microservice#get-method. Invoking this method using test-invoke-method and AWS Console gives the

aws-serverless-express via AWS API gateway asking for authentication even not setup for that

与世无争的帅哥 提交于 2020-01-14 05:34:04
问题 sorry for such 101 question but I'm kinda new with AWS, NodeJS and Express. I'm setting up a basic serverless API Gateway: index.js import AwsServerlessExpress from 'aws-serverless-express'; import App from './src/app'; const server = AwsServerlessExpress.createServer(App); exports.handler = (event, context) => AwsServerlessExpress.proxy(server, event, context); ./src/app.js import Express from 'express'; import BodyParser from 'body-parser'; import AwsServerlessExpressMiddleware from 'aws

When and when not to use aws lambda functions [closed]

旧时模样 提交于 2019-12-25 08:39:03
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have a general understanding of serverless architecture. I was wondering what are the top pro's and con's using this architecture compared to the previous generally used architectures. 回答1: Pros Invoke Lambda Functions only during event triggering VS keeping Instance(s) idle for

C#-Azure function:How to log message to Queue storage when calling to “HTTP Trigger” azure function?

久未见 提交于 2019-12-24 19:10:57
问题 I have a azure function with "HTTP Trigger" in C#. I want to log a message to queue storage when I invoke azure function with "HTTP trigger". When "HTTP trigger" is invoked it logs a message (log.info("C# Http trigger....");) somewhere else but I want to this log message along with ipaddress, (when user makes request to "HTTP trigger" function) to be stored in Queue storage (log.info("C# Queue trigger ",ipaddress)) so that I can block client ipaddress for a day, if user makes calls to api

Rename an Azure Function

不羁岁月 提交于 2019-12-18 11:38:15
问题 How to rename an Azure Function ? I want to replace a default 'HttpTriggerCSharp1' name to my own. At the moment unfortunately this name is included in the function url and there is no option to change it: https://functions-xxx.azurewebsites.net/api/HttpTriggerCSharp1 回答1: The UI does not directly support renaming a Function, but you can work around this using the following manual steps: Stop your Function App. To do this, go under Function app settings / Go To App Service Settings, and click

Use sphinx within a serverless model

人走茶凉 提交于 2019-12-13 03:25:31
问题 I am currently using sphinx to automatically generate my documentation site from ReStructuredText files within a bitbucket repo. This is of course all managed/hosted internally but I have been thinking more and more about whether I could switch this out for a more serverless model, using FaaS to generate the site and then a cloud based site hosting for the actual hosting (e.g S3 static site hosting). I was wondering whether it was possible to use sphinx in a programmatic way (e.g within a AWS

Can `dat` protocol efficiently support live streaming of video?

隐身守侯 提交于 2019-12-08 01:28:43
问题 I would like to be able to live stream video (or any other file that is large and continuously modified/appended) via dat . Here it says, The dat:// protocol doesn't support partial updates at the file-level, which means that with multiple records in a single file, every time a user adds a record, anyone who follows that user must sync and re-download the entire file. As the file continues to grow, performance will degrade. Putting each record in an individual file is much more efficient:

API Gateway with Cognito User Pool Authorizer and Lambda

三世轮回 提交于 2019-12-07 20:19:07
问题 I am having an Architecture where I am using API Gateway with Cognito User Pool Authorizer and I am passing the IdToken in Authorization Header from client side ReST call. It is working fine. I need the cognitoIdentityId in Lambda. Tried Body Template Mapping in Integration Request in API Gateway Content type - application/json { "cognito-identity" : "$context.identity.cognitoIdentityId" } It doesn't send the identityid (in event or in context) and also it transforms my payload only to this

prevent NodeJS program from exiting

你离开我真会死。 提交于 2019-12-06 00:26:08
问题 I am creating NodeJS based crawler, which is working with node-cron package and I need to prevent entry script from exiting since application should run forever as cron and will execute crawlers at certain periods with logs. In the web application, server will listen and will prevent from terminating, but in serverless apps, it will exit the program after all code is executed and won't wait for crons. Should I write while(true) loop for that? What is best practices in node for this purpose?

Cannot debug serverless application in Visual Studio Code

我的未来我决定 提交于 2019-11-30 14:53:46
问题 I have tried to debug serverless application developed using serverless framework in VS code. I have followed this article. But when I trying to debug the code I'm getting an error from VS code as below. Cannot launch program 'g:\Projects\Serverless1\node_modules.bin\sls'; setting the 'outDir or outFiles' attribute might help. sls command file already exists in the folder and following are the launch.json file settings "version": "0.2.0", "configurations": [ { "type": "node", "request":