12 votes
Accepted

Connecting to SMTP server from AWS Lambda

This is expected. Lambda functions in a VPC can't communicate with the Internet (including the standard service APIs) using an Internet Gateway, because an Internet Gateway requires the internal ...
11 votes

AWS SQS + SNS + Lambda

One thing I did was to create a CloudWatch alarm on ApproximateNumberOfMessagesVisible (>= 1 for 5 minutes) for the SQS queue. The alarm publishes to an SNS topic that triggers the lambda function. ...
8 votes
Accepted

IP Address exhaustion for lambdas in VPC

This answer is now out of date. See this blog post or other AWS documentation for up to date information. This page says how many ENIs are required when using Lambda inside a VPC - this is per subnet ...
  • 31.1k
7 votes

AWS SQS + SNS + Lambda

You can't go SQS -> SNS, only SNS -> SQS. Lambda now supports scheduling so one option is to implement an SQS poller in a Lambda function and run it frequently. Another option to consider is ...
  • 1,849
6 votes
Accepted

AWSLambdaExecute policy definition

If your function has nothing to do with S3 then don't use this managed policy. As far as I can see this policy is used in the documentation in combination with a tutorial on how to use Lambda with ...
  • 268
6 votes
Accepted

Configuring X-Ray in Lambda with AWS CloudFormation vs TracingConfig

While not clear, TracingConfig is the setting to enable AWS X-Ray. TracingConfig is a property of the AWS::Lambda::Function resource that configures tracing settings for your AWS Lambda (Lambda) ...
  • 76
6 votes

Passing parameters to AWS Lambda

You can pass ES cluster endpoint to Lambda function as an environment variable. Here is a snippet of CloudFormation template for such function: "mylambda": { "Type": "AWS::Lambda::Function", "...
  • 5,797
6 votes
Accepted

AWS SQS behavior with multiple Lambda Triggers set

SQS message can only be read once from the queue and while it's being processed by one consumer it will be invisible to other consumers. If you've got multiple lambdas each will get their share of the ...
  • 24.2k
6 votes
Accepted

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

Elastic Beanstalk is your traditional hosting - you can upload a PHP or Java or whatever application, say Wordpress, configure a database, etc, and go. There are some smarts for scaling, recovery, etc,...
  • 24.2k
5 votes

How can trigger S3 (different region ) event from lambda?

S3 event can't trigger a lambda in a different region. What you can do is for example: Send the S3 event to SNS topic or SQS queue and trigger lambda in your target region from that message. Trigger ...
  • 24.2k
5 votes

How can I search across CloudWatch log groups on AWS?

You can select multiple log groups in Cloudwatch Log Insights to search across multiple log groups / streams. Query syntax is here. The syntax is a bit fiddly but not difficult.
  • 31.1k
4 votes

How can I deploy a large application to Lambda using Serverless, bypassing or not reacking CloudFormation resource limit

The 200 number is a hard limit. You will not be able to deploy this application, as is, through serverless. However, if you're willing to break things up, you can get around it. CloudFormation has ...
  • 132k
4 votes

How to get the IP Address for a specific AWS ECS task?

It turns out my original premise (needing to know the task container's own internal IP address for service discovery) is very flawed - that IP address is only usable within a single EC2 Container ...
4 votes
Accepted

AWS restore_db_cluster_from_snapshot yet no instances

Yes, you have to launch an instance in the cluster. An Aurora cluster has an Aurora Storage Volume with your data, and 0 or more instances that can access it. You can't actually access a cluster's ...
4 votes

What level of permissions should my developer need in AWS?

He is correct that the SystemAdministrator policy lacks the rights to create IAM roles, which are going to be needed for Lambda. You should never give root access or your login credentials to anyone. ...
  • 687
3 votes

Route public 3306 traffic to private VPC through NAT?

The answer to your question is you must undo step 4 and use a different subnet for lambda to access the Internet. However you should never, ever, make MySQL publically accessible. This is a massive ...
  • 171
3 votes

Creating a CloudWatch Scheduled Event with arbitrary data in the `detail` field

# This is for AWS Sam CF MyScheduledRule: Type: "AWS::Events::Rule" Properties: Description: "ScheduledRule" ScheduleExpression: "rate(6 minutes)" State: "ENABLED" ...
3 votes
Accepted

Using boto in an AWS lambda function in a VPC

The issue was that I needed to have a NAT on the subnet the Lambda function is running in - an Internet Gateway is not enough! I'm assuming that this is because the Lambda runs only privately, and ...
  • 565
3 votes
Accepted

AWS lambda fails to access internet, despite having proper IGW, NAT and routing table entries?

Based on Michael's answer, I was able to figure this out finally. (Many-many thanks to him! :)) Since I have struggled with this so much, I am capturing the final solution, just in case someone hits ...
3 votes
Accepted

AWS Lambda as an Application Load Balancer target?

That's correct - technically API gateway handles all of the load balancing for you against any newly provisoned or warm lambda functions. But many people (ourselves included) wanted to use ALB's for ...
3 votes
Accepted

AWS Permissions: Lambda access Denied to S3

I believe the solution should be as simple as changing your LambdaExecutionRole to this: LambdaExecutionRole: Description: Creating service role in IAM for AWS Lambda Type: AWS::IAM::Role ...
  • 24.2k
3 votes

AWS, SQS trigger to Lambda is automatically disabled when Lambda fails

I'm not sure why the Lambda stops working. I suspect Lambda service notices that it keeps failing so it temporarily suspends it. Not sure. You can try a number of workarounds: Use DynamoDB on demand ...
  • 24.2k
3 votes
Accepted

AWS, SQS trigger to Lambda is automatically disabled when Lambda fails

AWS support says the trigger can be disabled because of the insufficient permissions for the Lambda execution role. My question: Where the conditions when the Lambda trigger can be automatically ...
  • 71
3 votes
Accepted

how to see logs produced by aws lambda function using aws cli

When you create a lambda function it should have a log group associated with it, but it looks like there aren't any in your account. You could try creating a new log group with the name '/aws/lambda/&...
  • 196
3 votes

Trigger AWS Lambda by S3 object GET

Rather then having them public for anyone to download I would make them private and only distribute pre-signed URLs to your colleagues and clients. You can create a simple portal where your clients ...
  • 24.2k
3 votes

How does AWS Lambda pass logs to CloudWatch Logs?

Lambda runs using a service linked role that gives it permission to write to CloudWatch logs. You will have created this role, or used the GUI to give lambda permission to create the role on your ...
  • 31.1k
2 votes

Amazon Lambda for video and image processing?

The last thing you want is to have a valid use case (eg. large video) hit the Lambda limitations (time and/or disk storage). You should reduce your steps into small, single-task chunks, for example: ...
  • 9,864
2 votes

What is a practical difference between RPC and FaaS?

In basic way yes, it is the same. You're using some another resources in way they owners described. RPC is one of protocols how you can access remote resources, defined in RFC 1831. Another protocol ...
2 votes
Accepted

Store request body of route without hitting web server in AWS

You register targets, such as EC2 instances, with a target group. http://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html You've made an astute ...
2 votes

AWS restore_db_cluster_from_snapshot yet no instances

Here's the official AWS documentation on restore_db_cluster_from_snapshot: Note This action only restores the DB cluster, not the DB instances for that DB cluster. You must invoke the ...

Only top scored, non community-wiki answers of a minimum length are eligible