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 in AWS by vijaykumar
• 140 points
162 views

1 answer 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 by MD
• 8,870 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,150 points
1,341 views
–1 vote
1 answer

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,600 points
17,976 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer