How can I send YOLO inference result on EC2 instance to local laptop?

0

I want to kick YOLO inference on an EC2 GPU instance from a local laptop. Images for the inference are periodically captured by a camera mounted on the robot. I want to perform inference at the time each image is taken.

My plan is as follows.

  1. upload the images to the S3 bucket.
  2. trigger the S3 upload event, AWS lambda executes the inference function on EC2.
  3. When the inference is complete, send the results to a local laptop.

Can anyone give me suggestions or advice on how to implement the above flow? This flow is intended to be executed asynchronously.

asked 7 months ago231 views
1 Answer
1
Accepted Answer

Hello.

The implementation of #1 and #2 is not difficult.
Follow the steps in the following document to set up S3 events targeting Lambda.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/notification-how-to-event-types-and-destinations.html

Create code to execute Systems Manager RunCommand to send commands to EC2 in the target Lambda.
Execute RunCommand in Lambda to start the inference process in EC2.
Specifically, this code can be used.
EC2 should also be configured as a managed instance of Systems Manager.
https://docs.aws.amazon.com/systems-manager/latest/userguide/managed_instances.html

I think number 3 would be difficult to send to each laptop, so it would be easier to put the inference results to S3 or something and notify that event on SNS or something.
It may be a good idea to go to S3 to retrieve the target file when the event is notified via SNS.

profile picture
EXPERT
answered 7 months ago
profile pictureAWS
EXPERT
reviewed 7 months 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