Skip to content

ibrahimalkurdi/lambda-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lambda-task

This task is to covert CSV file to JSON by Lambda Function

Prerequisites

  • Ensure aws-cli and terraform installed on your machine
  • Add the needed credentials and configs to the setup as below:

1- Clone the Lambda-task repo and create file called ".aws-credentails" in the top level directory.

2- Add your AWS Access keys in the .aws-credentails file as below:

export AWS_ACCESS_KEY_ID="XXXXXXXXXXXXXXXXXXXX"  # Relplace the placeholder with your Access key
export AWS_SECRET_ACCESS_KEY="XXXXXXXXXXXXXXXXXXXXX"  # Replace the placeholder with your Secret key

Note: The Access Keys must have either Administrotor access or admin access on S3, Lambda and SQS resources.

3- Add the initial config in the config.sh file

export AWS_DEFAULT_REGION="" 		# AWS Region for the created AWS resources
export PROJECT_S3_BUCKET=""		# The S3 bucket were the CSV files stores
export TF_VAR_state_bucket=""		# The bucket were the Terraform state files stores in S3 bucke
export TF_VAR_project_name=""		# Variable of the Project name to be used in the Terraform resources which  will be created.
export TF_VAR_aws_region=""		# Terraform AWS region variable

4- Run the bootstrap script to ensure the setup is ready to be launched

bash bootstrap.sh

Launch the setup:

It will create the terraform resources which inlcudes S3 bucket, Lambda, SQS and the needed permission.

bash init.sh

Clean up

To destory all the created resources (except the Terraform State S3 Bucket, it should be cleaned up manually) Run the following command:

bash destroy.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published