execute a command on amazon lightsail using aws-sdk-php

0

currently I am using a php library to connect to server via ssh and run a command there, I want to know "is there any thing in aws-sdk-php for that?" Basically I am exexuting a node JS script.

tariq
asked a year ago217 views
1 Answer
0
Accepted Answer

is there any thing in aws-sdk-php for that

No. The Lightsail API deals in modifying the resources in your AWS account. Lightsail doesn't have any control over the content of your instances after initial creation.

What triggers the PHP script?

  • If you want the job to run at regular intervals you could install a cron job on the instance to trigger the script.
  • If you want to trigger this on-demand from another service you can keep using SSH or create an HTTP endpoint to trigger it (using firewall rules or some sort of authentication to prevent public access; the advantage of HTTP is that you don't need to distribute the instance SSH keys).
AWS
MODERATOR
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions