Any way to run cron in AWS AppRunner?

0

Hello, I have a Symfony app in AWS AppRunner with ECR, and I need to run a scheduled command (php app/console ...), but I dont know how to do this in AppRunner, how to do it? If its impossible, its possible to use Eventbridge->Lambda(command sh on linux)->AppRunner? I tried to do it but its hard ^^

Thanks :)

PS: Sorry my english are not very good ^^'

質問済み 2年前1436ビュー
2回答
1

Hello, I understand you would like a way to run a cron / scheduled command in App Runner. Because App Runner does not have an inbuilt cron/schedule functionality, you may use Event Bridge to trigger a Lambda Function which then runs desired commands. See Controlling and monitoring AWS App Runner applications with Amazon EventBridge for an example of using an Event Bridge cron schedule to pause and resume an App Runner service using Lambda. You could modify this solution as needed.

AWS
回答済み 2年前
0

Thanks to your answer! Well it was what I did

I used Event Bridge with Lamba function, but I didnt find how to run a custom command (symfony, "app/bin ..."), but in the doc it looks I can only run "pause", "resume", "update" well only preconfigured commands ^^' so for now I created an endpoint from my symfony app an I run a GET request from Lambda ^^'

回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ