04 November 2020

AWS-Lambda

  • Lambda functions are independent
  • Lambda is serverless- Serverless computing allows applications and services to be built and run without thinking about servers. With serverless computing, application still runs on servers, but all the server management is done by AWS.
  • Lambda is priced on a pay per use basis and there are no charges when the code is not running
  • Lambda functions can trigger other lambda functions
  • Lambda functions should be stateless. State can be maintained externally in DynamoDB or S3
  • Architecture can get complicated, AWS X-ray helps to debug
  • Code uploaded to cloud, you control when it executes.
  • Each AWS Lambda function runs in its own isolated environment
  • Default timeout - 3 sec
  • It is a compute service mainly used to run background processes. It can trigger when used with other AWS services.
  • Inbound network connections are blocked by AWS Lambda
  • Outbound connections only TCP/IP sockets are supported
  • ptrace (debugging) system calls are blocked.
  • TCP port 25 traffic is also blocked as an anti-spam measure.
  • Amazon S3 passes the event details to AWS Lambda when there is any file upload in S3.
  • DynamoDB can trigger AWS Lambda when there is data added, updated and deleted in the table.
  • API Gateway can trigger AWS Lambda on GET/POST methods.
  • SNS is used for push notification, sending SMS etc.
  • Scheduled Events can be used for cron jobs.
  • CloudTrail can be helpful in monitoring the logs on the account.
  • Kinesis is used to capture/store real time tracking data coming from website clicks, logs, social media feeds and a trigger to AWS Lambda can do additional processing on this logs.
  • CloudFront is a content delivery network where you can host your website and Lambda and Edge can be used to process the headers coming from viewer request, origin request, origin response and viewer response.
  • Lambda function can be granted permissions to access other resources using an IAM role.
  • Each AWS Lambda function has a single, current version of the code and there is no versioning of the same function. Versioning can be implemented using Aliases.
  • Each Lambda function version has a unique ARN and after it is published it is immutable. An alias can only point to a function version, not to another alias. Alias helps in rolling out new changes or rolling back to old versions.

No comments:

Post a Comment

Most views on this month