How to read a file from one ec2 instance make some changes and save in another ec2 instance using lambda function python

0 votes
I want to read a file from ec2 instance A from path (/home/sample/test.txt) and make some changes and send to another instance B to path(/home/testing/test.txt) using lambda function .

can anyone say how to do that?.if possible some sample code for that in python
Mar 24, 2020 in AWS by vijaykumar
• 150 points
4,289 views

2 answers to this question.

0 votes

Hi@vijaykumar,

I don't know you can do directly or not. But you can transfer file in different way. 

  • First you have to transfer your modified file from EC2 instance to S3 bucket. To do that you can follow the below given link.
https://www.edureka.co/community/64606/how-upload-file-from-ec2-linux-bucket-using-lambda-function?show=64609#a64609
  • From S3 bucket you can transfer your file in different instance.

Thank You

answered Mar 27, 2020 by MD
• 95,460 points

Related Questions In AWS

0 votes
1 answer
0 votes
1 answer

How to download a file from EC2 instance to local computer?

You need to specify your download location. ...READ MORE

answered Oct 10, 2018 in AWS by Archana
• 4,170 points
8,822 views
+1 vote
2 answers

How to read a csv file stored in Amazon S3 using csv.DictReader

The code would be something like this: import ...READ MORE

answered Oct 25, 2018 in AWS by Archana
• 5,640 points
54,715 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP