9

As far as I know, it is not possible. The the offcial AWS Lambda documentation says it support CloudWatch Events, but no mention of CloudWatch Alarms (and CW Events != CW Alarms) What you are currently doing, sending the alarms on a SNS and using listening on a topic seems the way to go. In fact, CloudWatch Alarms only outputs to SNS so far.


9

It's kind of hidden away and not very intuitive. Within the AWS Lamba admin: Create Function > Author from Scratch. Within the Code entry type dropdown there is a Upload a .ZIP file option.


8

I'm not sure it's a best practice but what I would do is using filebeat to read the log in near real time and push it to ElasticSearch. AWS provides an ElasticSearch Service which can save you from this part. The drawback of using filebeat directly to elasticsearch is that the time of events will be the time the prospector read them and if your logs have a ...


7

There are a couple of elements to consider here: It is valuable to have the capability to maintain configuration with a separate release cadence from the code that is being configured. Doing so encourages rotation of credentials in an automated manner, do it regularly make it painless. It is entirely reasonable from an "Infrastructure as Code" point of ...


6

Dawny33 response is good, but I would start earlier in the development process. Keeping an eye on your cloud environment to make sure that your functions behaves as you expect (including your "production" functions, which might operate on a different data set) is crucial, because it might reveal things that are impossible to reproduce locally or with a test ...


5

Use Step Functions. They allow you to coordinate lambda functions and have an inbuilt wait state


5

Check out the IOpipe profiler to get full v8 profiler dumps from Lambda invocations. You can load those into Chrome Devtools to see exactly where CPU time is spent, and how memory is being used for your functions. Disclaimer: I work for IOpipe


5

I might not be able to answer it completely, but here are my views from my limited experience with lambda: Speed-Performance: The duration of a single run of a lambda function will be present in the dashboard of the Lambda's monitoring tab, which looks something like this: So do throttles/errors/number of invocations. One can also set up CloudWatch ...


4

Why not something like Redis? (can use it through ElastiCache). Hard to answer this without knowing the operational requirements of this project. Is this data strictly for logging/research, or is it operational (i.e. this "table" is consulted in order to know which lambda to invoke). Dynamo vs. RDS - depends how spiky your traffic is. Dynamo is very ...


4

I have also asked the AWS Support folks for help too, as Lambda's security was crucial for us [HIPAA compliancy]. This was their response: Lambda has two options, you can have your lambda functions without a VPC or you could place your lambda function within a VPC. If you want to put your lambda function within VPC, then the most important thing to ...


4

There is likely no general answer to this question, but some reasons to not consider Lambda (or other serverless platforms) include: App requires a language which is not available (C++, Haskell, Erlang, etc.) Organization has existing substantial investment in containerized (or other) app development model, including developer knowledge, build and ...


3

There's a generator for policies in IAM (Into IAM -> Policies -> Create), choosing connect gives me the following policy: { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "connect:DescribeInstance", "connect:CreateInstance", ...


3

An SQS queue can now be wired directly to a Lambda function as an event source, so you don't have to start the Lambda function on a schedule. https://aws.amazon.com/blogs/aws/aws-lambda-adds-amazon-simple-queue-service-to-supported-event-sources/


3

You've got a couple of options: 1. Embed the source code to the CloudFormation template I do just that in my ec2-start-stop demo. You'll see file ec2-start-stop.template.yml with these lines: StartStopLambda: Type: AWS::Lambda::Function Properties: [...] Runtime: python3.6 Code: ZipFile: Fn::...


3

I found the solution while trying to manually deploy the Lambda function as a jar file. These are the steps - Create your Lambda function as a Maven project using the AWS documentation. Create your Jenkins job as a Maven project and specify package in the goals section. Follow the Jenkins Lambda plugin documentation for deployment and specify target/your-...


3

The API for creating a function includes a section to choose which VPC to use for running that function. source: https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html#SSS-CreateFunction-request-VpcConfig It doesn't have to be the default VPC, it can be any VPC. Consider that "EC2 server inside a VPC" only means that it is some virtual ...


3

I wrote a bit about this on my LinkedIn post which was based on the article by Andrea Passwater. In brief, do not go serverless, if You want complete control of the infrastructure and latest system patches If your microservices are complex, and thus have some latency in starting up and computing output You are not prepared for a heavy reliance on event-...


2

For question #1) I think this could perhaps be better answered on SoftwareEngineering SE. Nonetheless, I'll risk an answer: for this kind of information (states) coming from that kind of architecture (distributed), I recommend event sourcing. It removes the complexity and many headaches that come with the nature of distributed systems if someone try to ...


2

From your comment above: The main difficult is launch the second lambda with a delay from the first one and without doing a pooling constantly As using SQS queues are an option for you, you can make CloudWatch alarms which can monitor for activity in the queues, and link them up with SNS, which can be used as a trigger for LambdaB. So, your flow can ...


2

You can upload using aws-cli. aws configure aws lambda list-functions aws lambda update-function-code \ --function-name MyLambdaFunction \ --zip-file fileb://index.zip See https://developer.amazon.com/blogs/post/Tx1UE9W1NQ0GYII/Publishing-Your-Skill-Code-to-Lambda-via-the-Command-Line-Interface


2

In my point of view, you can have a future gain separating the function into multiple parts because it will allow to use another combining system/upload/whatever as input to the processing part and another system to process the images later. My personal rule of thumb for separation is the main concern: Step 1 is giving the input, it's already somethhing it ...


2

Provided the Public Subnet where you're launching your Lambda is configured with Auto-assign public IPv4 address: Yes it should work in public a subnet without NAT. Whether or not it's a good idea is another question. In general you shouldn't launch any backend services in the public subnets, the public subnets are for things like API Gateways, NAT Gateways,...


2

A variation of method 2 is infinitely scalable: write the data to s3. from s3 trigger lambda to break s3 file into sqs queue events of good size from sqs queue trigger lambdas to insert sqs can be fifo queue if it matters.


2

Your idea will work. The organization I work for maintains some open source examples how to do deploy to AWS using a pipeline. In comparison we use GitLab for the purpose. Instead of Travis we use GitLab Runner. You configure it using the file .gitlab-ci.yml which runs the tests and deploy the AWS Lambda to dev, test and production environment every time a ...


2

1.) Create API (create-rest-api from the cli) simply creates the API Gateway resource, but it does not create the method, stage, authorizer, etc. for your API Gateway. Deploy API (create-deployment from the cli) will deploy either to an already created stage, or create a new stage for deployment. 2.) No, it will not deploy a CloudFormation stack in your ...


2

Follow these steps to fix InvalidCiphertextException: Open the Lambda function in AWS console. Scroll down to the Environment Variables section & click Edit: Delete the value of kmsEncryptedCustomerToken & replace it with the customer token you got from https://<your-company>.loggly.com/tokens. The token looks like this: 72cf6d64-256e-449d-...


2

Call Lambda's UpdateEventSourceMapping API with the {"Enabled":true/false} request body. If, for some reason, you want your own API for this, you can create one in API Gateway as described below. Before you begin, you need the UUID of the event source mapping you wish to enable/disable. Use the AWS CLI to get this (it isn’t shown on the UI): aws ...


1

First try to review current caching parameter values. Then check list in AuroraMySQL.Reference.ParameterGroups And try to tune/increase caching parameters like query_cache_size Alternative solution is to use architecture redesign with AWS CloudFront to reduce load on primary system (probbly web?).


1

you can change the trigger working process and rewrite and re schedule the process. Which the way you want. it will work. Hope it helps.


1

CloudFormation is service that allows you to create your infrastructure from code to automate your deployments. You can set up a rule to run an AWS Lambda function on a schedule by using CloudWatch event. https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html


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