Questions tagged [amazon-lambda]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
29 views

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 ...
0
votes
1answer
40 views

How to add IP to in existing inbound rule in a security group of Amazon EC2?

I am using Amazon API via a Lambda function to allow my teammates access my server. Using post method I am invoking this lambda function to add teammate's IPs in inbound rule. I want to add IPs to an ...
0
votes
0answers
15 views

Linux: Adding service definitions without changing /etc/services

Background: Working on an AWS Lambda layer, which does not give access to /etc/hosts or /etc/services. For hosts, the environment variable HOSTALIASES provides an alternative mechanism for adding ...
0
votes
0answers
9 views

AWS EFS vs Aurora

We are considering how much would it cost to use SQLite with EFS vs Aurora MySQL because we think using EFS is less complex and covers all involved database security/reliability issues We understand ...
0
votes
0answers
5 views

Modify an xml response via Lambda @ edge

Newbie question:- I have a origin server that is providing a xml response over URL that I wish to modify (change/insert text). I am hoping to do this via L@E using python so that the enduser will ...
0
votes
0answers
55 views

How can I set up my HostedZone so that it delegates to a parent DNS record in another AWS account?

Introduction I have some TypeScript code that uses CDK to create an API Gateway and a Lambda. It works and deploys to a standard AWS URL. So far so good. I now need to transfer the API Gateway so that ...
0
votes
0answers
27 views

AWS API Gateway and Lambda concurrency limit queueing

We have a simple API running in AWS using API Gateway and Lambda. The API Gateway is setup as HTTP API type and directly integrates to a Lambda function. We want to be able to limit the maximum number ...
1
vote
0answers
24 views

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: [...
0
votes
2answers
53 views

Modify AWS Lambda function inside CloudFormation stack

I've launched this stack and needed to update it's Lamdba function, I've made some amendments and hit deploy, a new version of function was saved, however Lambda application still refers to the first ...
0
votes
1answer
107 views

Kubernetes + AWS Lambda [closed]

I currently have an API service running on AWS Lambda, but it's getting expensive due to high AWS costs. My aim is to replace 95 % of the usage with a cluster of servers and still handle peaks with ...
0
votes
0answers
6 views

AWS Win Tasks aren't running after server restart via Lambda

I have coded a simple task scedule that turns the AWS Windows server off and a simple Lambda code to turn the stopped instaces on, see code: import time import json import boto3 def lambda_handler(...
0
votes
0answers
15 views

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) ...
0
votes
1answer
230 views

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 ...
0
votes
0answers
65 views

What is wrong with this AWS SAM YAML Auth ResourcePolicy?

I tried to use the following Resource Policy for my API Gateway (YAML): Auth: ResourcePolicy: IntrinsicVpcWhitelist: - vpc-<ID Removed> I deployed via SAM, ...
0
votes
1answer
26 views

How do i add nodejs runtime layer layer to my Python Lambda on AWS?

wscat test In my Python lambda I want to use wscat which requires node: $ /opt/wscat-layer/bin/wscat /usr/bin/env: node: No such file or directory Question: How do I add nodejs runtime to my Python ...
0
votes
0answers
31 views

Cannot GET error thrown from the nodejs express app running in AWS lambda, deployed using serverless, behind API Gateway

I'm trying to deploy a simple nodejs/express app in AWS lambda using serverless module and its plugins like serverless-http. The lambda is running behind the API Gateway, which should trigger the ...
1
vote
0answers
11 views

How to stop Lambda from incurring CloudTrail charges related to CreateLogStream?

I manage an actually not very big website, but Lambda is used extensively, invoked many times per site visit, resulting in hundreds of thousands of calls per month. I noticed a spike in CloudTrail ...
1
vote
1answer
182 views

403 when using Terraform to attach Lambda Function to Target Group w/ ALB

I'm able to create Instances, Target Groups, and ALBs just fine with Terraform, but am getting stuck when trying to use Lambda Functions. It looks like the Lambda function gets created OK along with ...
0
votes
1answer
18 views

What could be a best solution for ElasticBeanstalk environment stop/start for cost saving

So i have a use case where we only need Elasticbeanstalk environment only in weekdays and in business hours only. So here at the moment i'm using a lambda function which terminates App environment and ...
0
votes
1answer
58 views

How to stream CloudWatch log group to specific Lambda function version?

When creating a new subscription filter for a CloudWatch log group, the AWS Console doesn't seem to offer a way to select a specific Lambda fn version. This is important for CI/CD where I might want ...
0
votes
0answers
9 views

At which allocated RAM does AWS Lambda change the instance size?

I have a Flask api running on AWS Lambda. When i increase the allocated RAM to the function the response time decreases, which is of course good. But that also means that the "instance size" ...
2
votes
1answer
186 views

AWS CloudFormation - Creating Layer Version and Function that uses layer

I have a Cloudformation template that currently looks roughly like the following. Resources: MyLayer: Type: AWS::Lambda::LayerVersion Properties: CompatibleRuntimes: - nodejs12....
0
votes
1answer
92 views

Lambda connect to mongodb which only allow localhost connection in ec2

I have a MongoDB which only allow connection from localhost, running on my ec2. Currently, only my nodejs app which runs on the same ec2 instance connects to the mongodb using this command mongoose....
4
votes
1answer
485 views

Can't deploy same lambda in multiple regions from s3 bucket

We are deploying a lambda using CloudFormation SAM templates. We would like to package the lambda into an S3 bucket, then deploy the AWS::Serverless::Function in multiple regions. However, lambda code ...
2
votes
1answer
58 views

Resizing images using AWS Lambda - issue

I'm trying to resize images automatically using Amazon S3/Lambda. The problem is I cannot get any connection to Amazon S3 buckets while creating a Lambda function. Creating a new blank function in ...
0
votes
1answer
129 views

Compiling and running untrusted code on a server

In teaching CS, students submit their code to our server and we compile and run with unit tests. Similar to Codeforces, Codewars, and HackerRank. How should we be configuring servers for this? Launch ...
1
vote
1answer
537 views

AWS Lambda automatically use latest layer

We have a server-less stack that relies on multiple AWS Lambdas to perform tasks. To help make code re-usable we have multiple Lambda Layers shared across the Lambdas. Our issue is, when we make a ...
1
vote
0answers
53 views

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 ...
0
votes
2answers
45 views

Using AWS lambda or Google Functions to run the a large number of parallel instances of the same script with different arguments [closed]

I have a script for collecting data for different social media hashtags. The script currently makes a bunch of sequential HTTP requests, formats the data into a Pandas data frame, and saves it to a ...
1
vote
0answers
28 views

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 ...
2
votes
1answer
163 views

How can I get AWS cloudwatch logs into GCP stack driver logs viewer?

I have set up the "connector account" thing in Stackdriver, and I'm able to see metrics in GCP, which is super cool! I would now like to also get all cloudwatch logs into google's logging tool. Can ...
1
vote
1answer
29 views

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 ...
1
vote
1answer
1k views

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 ...
1
vote
1answer
283 views

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 ...
2
votes
1answer
400 views

Is DynamoDB latency almost the same as RDS latency?

I am exploring using AWS Lambda through Laravel Vapor. Avoiding the use of Redis can save us ~$56/mo (t2.small at ~$24, NAT Gateway at ~$32). Instead of Redis, I plan to use DynamoDB which is much ...
2
votes
2answers
219 views

Trigger AWS Lambda by S3 object GET

My Problem I have a public S3 bucket which serves as a storage solution for large files (GBs) that I send to colleagues and clients. The files are auto-deleted after a few weeks. The problem with ...
0
votes
1answer
564 views

How to decrypt Secure String values in Parameter Store using .NET Core's AmazonSimpleSystemsManagementClient

I have the following code in a Lambda function: var ssmConfig = new AmazonSimpleSystemsManagementConfig { RegionEndpoint = RegionEndpoint.APSoutheast2 }; ...
0
votes
0answers
269 views

Can't connect to a public accessible AWS RDS

I was running a serverless web application on a lambda inside a VPC, and connecting to a Aurora-MySQL RDS instance, with inbound rules to allow traffic from the security group of the lambda The ...
5
votes
2answers
211 views

How to choose between Elastic Container Service (ECS) or Elastic Container Registry (ECR), Elastic Beanstalk, and Lambda?

Background: I've worked with EC2 and RDS. Recently I received a query from a client in which he wants to develop both mobile and web applications using Amazon Web Services, and need advice on which ...
1
vote
1answer
685 views

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 ...
2
votes
1answer
68 views

Using Lambda functions to create a REST API

We have a web app that is powered by an API made up of AWS Lambda functions. For the API, we have three environments (prod, staging, and demo). We were developing the functions using serverless-...
0
votes
0answers
515 views

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 ...
1
vote
0answers
104 views

AWS lambda add-permission --source-arn weirdness

I'm following this guide on setting up a lambda function to subcribe to log events. In step 5 you need to "Grant CloudWatch Logs the permission to execute your function" like this: aws lambda add-...
0
votes
0answers
463 views

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 ...
1
vote
2answers
400 views

Running AWS Lambda in same VPC as DocumentDB or DynamoDB

We are currently running our AWS Lambda's in a VPC due to an earlier architectural decision. We are also using MongoDB Atlas and a peering connection setup between the VPC and Atlas. This obviously ...
1
vote
1answer
1k views

Update Amazon RDS Certificate SSL Issue with MySQL Lambda

Like many people I have updated my Amazon RDS Certificate to CA_2019 from CA_2015. At first everything seemed fine but later on checking I noticed the mysql lambda function which i wrote to query the ...
1
vote
1answer
1k views

AWS: Connecting Lambda to a Secret doesn't work

I am trying to connect a Lambda to a secret as per AWS docs. I set the following resource-based policy on the secret, and verified that it has indeed been set: { "Version": "2012-10-...
1
vote
1answer
762 views

AWS Cloudwatch log filter on stream name

I'm trying to setup a lambda function to process logs from an AWS instance. To do that I'm configuring a CloudWatch Logs "trigger" as input to my Lambda function. The relevant configuration UI on AWS ...
0
votes
1answer
114 views

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 ...
1
vote
0answers
613 views

AWS Lambda: How to install linux dependency packages?

I'm trying to perform HTML to PDF conversion with class library in AWS lambda function. The HTML converter has some dependency packages to be installed in the environment where the conversion takes ...