Questions tagged [amazon-lambda]

This tag is for questions about Amazon Web Services' "Lambda".

AWS Lambda lets you run code on the Amazon cloud without provisioning or managing servers. Lambda takes care of everything required to run and scale your uploaded code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app, and pay only for the compute time used.

154 questions
1
vote
1 answer

How can I track user requests to my external API on AWS?

I'm a bit of a beginner but I'm working on creating an external API with AWS SAM (using API Gateway and Lambda), and I want a way to track & monitor usage. Some options I was considering: 1. Store the requests in a database Pro: It would allow me to…
1
vote
0 answers

Autoscaling - lifecylehook implementation

I'm trying to implement my first ASG with a lifecycle hook and I am having this issue: LifecycleHandlerFunction: Encountered unsupported property Role The following resource(s) failed to create: [LifecycleHandlerFunction]. Rollback requested by…
1
vote
0 answers

How to access a private ELB URL in AWS Lambda

I have an ELB that is pointing HTTPS (443) - https://dummyendpint.com. This is in Private VPC and exposed to only whitelisted IP addresses. Now I am working on this endpoint (https://dummyendpint.com) in AWS Lambda but I can't able to make my Lambda…
1
vote
1 answer

AWS lamba start_instances gives pending response but console still shows stopped

I have a lambda function that I have setup to start an instance: import boto3 ec2 = boto3.client('ec2') response = ec2.start_instances( InstanceIds=['i-xxx'] ) print(response) The response looks good, showing it going to pending from…
eng3
  • 167
  • 10
1
vote
0 answers

Serverless Lambda infrastructure for listening to Websocket

I'm still new in the AWS Lambda & Api Gateway world, but it seems a good fit to my new project. I still have some concerns, and I'll be very happy if you can assist. In my new project (Financial data), I need to deliver different type of data :…
Francois
  • 13
  • 4
1
vote
0 answers

AWS data storage: how much to store with Cognito

I am new here. This is rather a choice-based question rather than purely technical one. Many mobile apps authenticate with Cognito, and I am going to use the same for ease of use + free tier advantage. However, to enable some functionality, I must…
1
vote
1 answer

How does AWS Lambda pass logs to CloudWatch Logs?

AWS somehow aggregate stdout and stderr of a lambda. I once bumped to a situation where a subthread of a lambda process stopped logging in the middle(using async technology was such a bad idea). I'm curious who aggregate the logs. Is there some kind…
1
vote
1 answer

Why can't my AWS Lambda connect to my AWS RDS proxy?

I can connect to my database locally just fine (of course with the normal DB endpoint, not the proxy endpoint). However, I just can't seem to get my lambda function to connect to the same database via my RDS proxy. Every time I run my lambda…
1
vote
1 answer

AWS API Gateway to Fargate, only charge when request is running

From the following link, it seems possible to call a Fargate task from the API Gateway: https://aws.amazon.com/blogs/compute/introducing-amazon-api-gateway-private-endpoints/ But, does the task have to be running 24/7 for this to work? Is it…
1
vote
1 answer

using an aws lambda as a node webserver

I have heard of people using AWS lambdas as a place to run node express webservers which to my mind is an awful idea for the following reasons: it is hard to run them in a similar state locally This is not their intended use Cold starts are a…
dagda1
  • 247
  • 3
  • 7
  • 19
1
vote
0 answers

How to create a Sandbox Environment in AWS?

I am trying to create a Sandbox playground in AWS for Users to practice some resources for 30min, after that, all resources should be deleted and account temporary account should also be deleted. I got some information like Cloud Formation, Lambda…
0
votes
0 answers

How can I setup an SQLite database for serverless Cloud Functions?

I have some Serverless Lambda Functions and I would like to host an SQLite database with about a GB of data for free or very cheaply (1 USD per month). My initial thought is to use Amazon Elastic File System or an EFS like service but I'm not sure…
0
votes
1 answer

How to target a instance with something other than instanceID

The goal i am trying to achieve is I have around 8 test instances that i want to stop when i am not at work to save cost. then start them back up again when i get back to work. I have a function that achieves exactly what i need import boto3 region…
NooBskie
  • 105
  • 8
0
votes
0 answers

AWS Application Load Balancer returns '412 Precondition Failed' when a conditional header is present

I have an ALB with a Lambda as a target. The lambda is a simple Python one and the only thing it does, is a return of a hardcoded dict. The response is a valid response for ALB and includes Etag header: import json def lambda_handler(event,…
0
votes
1 answer

Why use AWS API Gateway instead of naked Lambda?

This is more of a suggestion that I need. What is the need for API Gateway when we can directly execute Lambda functions from the apps? What are the missing pieces provided by API Gateway which we will otherwise miss while using naked lambda?