Skip to content

This repository contains a solution developed as part of a selection round in a hiring process. The task involved creating an AWS infrastructure that automatically triggers a Lambda function when a CSV file is added to a designated S3 bucket. The Lambda function then prints the contents of the CSV file to CloudWatch log streams.

Notifications You must be signed in to change notification settings

harshartz/AWS-Terraform-Automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Terraform AWS Lambda S3 Event

Task Details

The provided technical task was to create an AWS S3 Bucket, an EventBridge rule, and an AWS Lambda function using Terraform code. The objective is to trigger the Lambda function whenever a CSV file is added to the S3 bucket, with the Lambda function printing the CSV file data.

Overview

This project is a direct response to the provided technical task. The goal is to create an AWS Lambda function triggered by an EventBridge notification event whenever a CSV file is added to a designated S3 bucket. The Lambda function is specifically designed to print the contents of the CSV file to CloudWatch log streams.

Prerequisites

Before getting started, ensure that Terraform and the AWS CLI are configured on your system. If not already done, you can install the AWS CLI and configure it using the command:

aws configure

Getting Started

  1. Clone this repository:
git clone https://github.com/harshartz/AWS-Terraform-Automation.git
cd AWS-Terraform-Automation/terraform
  1. Edit the var.tf file to provide the necessary values. Update the AWS region and choose a globally unique S3 bucket name.

  2. Run Terraform commands to create the infrastructure:

terraform init
terraform apply
  1. Once the infrastructure is created, you can verify the functionality by uploading CSV files with different extensions to the specified S3 bucket. The Lambda function will only trigger when a CSV file is uploaded.

  2. View the output in CloudWatch log streams to see the printed data from the CSV file.

Feel free to explore and adapt this project according to your specific requirements. If you encounter any issues or have suggestions for improvements, please open an issue on this repository.

About

This repository contains a solution developed as part of a selection round in a hiring process. The task involved creating an AWS infrastructure that automatically triggers a Lambda function when a CSV file is added to a designated S3 bucket. The Lambda function then prints the contents of the CSV file to CloudWatch log streams.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published