Questions tagged [aws-serverless]

AWS Serverless implementation with API Gateway, Lambda functions, CloudFormation and SAM (Serverless Application Model).

Serverless computing allows you to build and run applications and services without thinking about servers. Serverless applications don't require you to provision, scale, and manage any servers.

You can build them for nearly any type of application or backend service, and everything required to run and scale your application with high availability is handled for you.

Links

  1. Serverless Computing and Applications

  2. AWS Serverless Application Repository

  3. Serverless AWS Functions documentation

1217 questions
4
votes
2 answers

AWS Express Step Function execution within Express Step Function

In the Standard Workflow we can happily invoke another Standard workflow using { "Type": "Task", "Resource": "arn:aws:states:::states:startExecution.sync:2", "Parameters": { "StateMachineArn": "${NestedStateMachineArn}", ... } …
RVid
  • 1,207
  • 1
  • 14
  • 31
4
votes
2 answers

Lambda scaling with SQS trigger

I have defined an SQS trigger to my Lambda. Inside the Lambda, I am calling a 3rd party api which is based on tokens(250 tokens per minute). Initially I had defined a batch size of 250, batch window of 65s, but what happened was that the lambda…
nats
  • 187
  • 2
  • 13
4
votes
1 answer

How to update AWS lambda using serverless framework without downtime?

There is a following setup: 2 lambda functions, deployed using serverless.yml custom domain (e.g. api.mydomain.com) attached to API Gateway 2 stages (dev and prod) CNAME configuration in my domain to point to abcdefg.cloudfront.net There's a…
4
votes
3 answers

How to update existing lambda function using AWS SAM

I have some lambda functions that have been created before moving to AWS SAM. I would like to update my existing lambda function using AWS SAM. What would be the process of referencing the lambda function in AWS SAM. I have a lambda function already…
4
votes
2 answers

Can Cognito User Groups be used for dynamic groups in a serverless app?

I'm developing a serverless application which includes a concept of groups which are not pre-defined (so not the classic fixed Admin/Guest...). Those groups are indeed generated freely by the end users of the application whom then can invite other…
4
votes
1 answer

Serverless.yml: Reference existing environment variable in another

I have a serverless.yml which looks like this service: my-service provider: name: aws runtime: python3.7 versionFunctions: false environment: ACCOUNT_ID: "${file(./serverless.env.yml):${self:provider.stage}.account_id}" …
4
votes
1 answer

SAM build in container with environment variables

Is there a way to pass environment variables to the container doing the build in: sam build --use-container In the sam build documentation, in parameters related to Docker, there is only --docker-network and --skip-pull-image Use case: I am using…
forzagreen
  • 2,509
  • 30
  • 38
4
votes
1 answer

Use serverless-iam-roles-per-function plugin with provider level iamRoleStatements

Is it possible to use both of these methods when defining a serverless file? I want to use serverless-iam-roles-per-function because I was running into Maximum policy size error from serverless framework But rather than having an IAM role per…
justinseo
  • 61
  • 6
4
votes
1 answer

How do I use shared code in lambdas in an AWS SAM template using layers in Node.js?

We have a very simple use case--we want to share code with all of our lambdas and we don't want to use webpack. We can't put relative paths in our package.json files in the lambda folders because when you do sam build twice, it DELETES the shared…
Brandon
  • 695
  • 10
  • 29
4
votes
1 answer

Deploying an AWS Lambda function using serverless does not deploy when external modules are required

I am currently trying to deploy an AWS lambda function using serverless. I can get the function to deploy correctly and respond if I don't include any external modules, however as soon as I attempt to include dynogels and Joi: const dynogels =…
4
votes
0 answers

How to remove .html extension using AWS Lambda & Cloudfront

I've my website's source code stored in AWS S3 and I'm using AWS Cloudfront to deliver my content. I want to use AWS Lamda@Edge to remove .html extension from all the web links that's served through Cloudfront. My required output should be…
4
votes
4 answers

How to trigger lambda for each item in a huge static dynamodb table

I have a dynamodb table with nearly 200k items. I need to trigger a lambda for each item in it (send each item to lambda as input). I want to perform this for every x hours for all the items in the table. Data in table changes every 5 days or so. Is…
4
votes
2 answers

How do you get the API endpoint's URL when it's created within the Events property of Cloudformation's Lambda definition

I'm creating a Lambda function via CloudFormation (AWS' SAM: Serverless Application Model) and have defined an API endpoint via the Lambda-function's Events property. ... MyFunction: Type: AWS::Serverless::Function Properties: …
4
votes
2 answers

Should I use AWS SAM for "simple" Lambda functions?

I'm currently using SAM for some of my serverless applications. I also have "simpler" lambda functions that don't require an API Gateway or a more complicated integration with AWS services. Some of these functions include S3 and DynamoDB trigger…
4
votes
1 answer

Listening to remote AWS SQS from local using serverless

I want to execute the lambda function locally , on SQS event which is on my AWS account. I have defined the required event but this not getting triggered. How can this be achieved? I am able to send the messages to the same queue using cron event…
Aryan
  • 1,767
  • 2
  • 22
  • 39