AWS Assignment– 3

AWS Lambda for Linux Learners

Basic Questions

  1. Explore the AWS Lambda Console and list available runtimes.
  2. Create a simple Lambda function in Python using the console (prints “Hello Lambda”).
  3. Create a Lambda function in Node.js using the console (prints system time).
  4. Use the AWS CLI to list all Lambda functions in your region.
  5. Deploy a Lambda function using the AWS CLI with a zipped Python script.
  6. Add environment variables to your Lambda function and read them in code.
  7. Assign an IAM Role to Lambda with CloudWatch Logs access.
  8. Verify Lambda function logs in CloudWatch after execution.
  9. Trigger a Lambda function manually from the console.
  10. Create a Lambda function that writes logs to CloudWatch.
  11. Create an S3 bucket and configure it as a trigger for your Lambda function.
  12. Upload a file to S3 and verify the Lambda function executes.
  13. Write a Lambda function that resizes an image uploaded to S3.
  14. Use CloudWatch Event Rule to run a Lambda function every 5 minutes.
  15. Create a Lambda function that writes output to an S3 bucket.
  16. Configure error handling with a Dead Letter Queue (DLQ) using SQS.
  17. Write a Lambda function that reads a text file from S3 and prints contents.
  18. Use Lambda Destinations to send success results to SNS.
  19. Monitor execution metrics of your Lambda function in CloudWatch.
  20. Write a short note on cost optimization in Lambda.

Intermediate Questions

  1. Use AWS CLI to update the code of an existing Lambda function.
  2. Create a Lambda Layer and use it in your function.
  3. Deploy a Lambda function using CloudFormation template.
  4. Use the AWS CLI to add environment variables to Lambda.
  5. Restrict a Lambda execution role to read-only access for S3.
  6. Create a Lambda function that reads system environment variables.
  7. Set concurrency limits for a Lambda function.
  8. Configure reserved concurrency for a specific Lambda.
  9. Use Lambda Destinations to send errors to SQS.
  10. Enable X-Ray tracing for your Lambda function.
  11. Deploy a Lambda function using SAM CLI.
  12. Test a Lambda function locally with SAM CLI.
  13. Write a Lambda that compresses uploaded files in S3.
  14. Create a Lambda that generates daily reports and uploads to S3.
  15. Trigger a Lambda with DynamoDB Streams.
  16. Create a Lambda that sends SNS notifications on file upload.
  17. Use Lambda with Parameter Store to read configuration values.
  18. Configure retries and error handling for a Lambda.
  19. Run aws lambda invoke CLI command to test your function.
  20. Document Linux shell commands commonly used with AWS CLI for Lambda.

Advanced Questions

  1. Write a Lambda function that automatically deletes unused EBS volumes daily.
  2. Create a Lambda function that rotates IAM keys automatically.
  3. Deploy a Lambda function using Terraform with IAM Role + S3 trigger.
  4. Integrate Lambda with API Gateway to expose a REST endpoint.
  5. Create a Lambda function that responds with system uptime.
  6. Write a Lambda that collects EC2 instance info and uploads it to S3.
  7. Enable detailed monitoring with X-Ray and analyze traces.
  8. Create a Lambda that scans uploaded files for malware (mock scan).
  9. Configure cross-region replication trigger with Lambda for S3.
  10. Deliver a project:
    • Create Lambda with Python runtime
    • S3 trigger (upload file → Lambda processes)
    • Logs in CloudWatch
    • Error handling with SQS DLQ
    • Monitoring with X-Ray