mardi 13 mai 2014

Android - se connecter à l'instance EC2 par programmation ? -Débordement de pile


I am new to android development and AWS. I am trying to make a PDF convertor android app where user can upload a TEXT file to EC2 (in EBS volume), it is then processed by my EC2 instance and then stored in S3.


My primary task is to connect(and upload file) to EC2 instance from my Android program. How can I do it?


I know that using PUTTY and SSH we can upload files to EC2. How it can be done programmatically in my case?




If you are writing this for an android app, connecting via SSH probably isn't the best way to go. You would have to put your key/password in the app, and it could likely be extracted.


The general way to solve something like this is to set up a REST API. You can write this in any language you feel comfortable with. The REST API would process the upload and do all the server side work.




You can put the commands you use in PUTTY into a bash script and reuse it. You can use the history command to get a list of the commands you have used.



I am new to android development and AWS. I am trying to make a PDF convertor android app where user can upload a TEXT file to EC2 (in EBS volume), it is then processed by my EC2 instance and then stored in S3.


My primary task is to connect(and upload file) to EC2 instance from my Android program. How can I do it?


I know that using PUTTY and SSH we can upload files to EC2. How it can be done programmatically in my case?



If you are writing this for an android app, connecting via SSH probably isn't the best way to go. You would have to put your key/password in the app, and it could likely be extracted.


The general way to solve something like this is to set up a REST API. You can write this in any language you feel comfortable with. The REST API would process the upload and do all the server side work.



You can put the commands you use in PUTTY into a bash script and reuse it. You can use the history command to get a list of the commands you have used.


0 commentaires:

Enregistrer un commentaire