Skip to content

sandyydk/Ec2Sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SETUP

PREREQISITES

  • AWSCLI installed and setup in target machine (CCM).
  • This code deployed in go for AWS Lambda.
  • Environment variables setup as appropriate.

AWS INSTALLATION IN TARGET MACHINE

  • yum install epel-release –y
  • yum install python-pip –y
  • pip install awscli

CONFIGURE AWS

  • aws configure

DEPLOYMENT BUILD FOR LAMBDA

  • GOOS=linux go build -o sync
  • zip deployment.zip sync

UPLOAD ZIP AND SET ENV VARIABLES

  • Upload deployment.zip

  • Set handler as sync

  • Set TARGET_IP = {target_machine_ip}

  • Set PEM_FILE = {target_machine_pem_file}

  • Set USERNAME = {target_machine_username}

  • Upload PEM_FILE to the S3 bucket of your choice.

  • Set S3 bucket of your choice to be the source for the Lambda fujnction. Event type = ObjectCreated

Thanks. For any queries contact - sandyethadka@gmail.com

About

AWS Lambda function to sync file changes to EC2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages