aws-lambda - Lambda、Bref 和 Symfony:命令不显示
问题描述
我正在使用 Bref 和 Symfony 在 AWS Lambda 中制作控制台应用程序。
我在本地开发了两个命令,这些都是可用的。
接下来,我按照教程https://bref.sh/docs/runtimes/console.html将 lambda 函数部署到 AWS,但是当我运行 lambda 函数时,我的命令没有出现。
我的 serverless.yml 文件:
service: my-worker
provider:
name: aws
# The AWS region in which to deploy (us-east-1 is the default)
region: eu-west-1
# The stage of the application, e.g. dev, production, staging… ('dev' is the default)
stage: production
runtime: provided.al2
environment:
# Symfony environment variables
APP_ENV: prod
plugins:
- ./vendor/bref/bref
functions:
# This function let us run console commands in Lambda
console:
handler: bin/console
timeout: 120 # in seconds
events:
- schedule:
rate: cron(0 1 ? * FRI *)
input: '"app:my-command"'
layers:
- ${bref:layer.php-80} # PHP
- ${bref:layer.console} # The "console" layer
package:
patterns:
# Excluded files and folders for deployment
- '!assets/**'
- '!node_modules/**'
- '!public/build/**'
- '!tests/**'
- '!var/**'
# If you want to include files and folders that are part of excluded folders,
# add them at the end
- 'var/cache/prod/**'
- 'public/build/entrypoints.json'
- 'public/build/manifest.json'
有人可以帮助我吗?
谢谢。
解决方案
推荐阅读
- javascript - 与加/分钟按钮一起使用时,innerHTML 不起作用
- typescript - TS2306 不是打字稿文件上的模块错误
- javascript - 如何使用 javascript 或 jquery 读取 DBUnit XML
- python - SyntaxError:编译单个语句时发现多个语句 - python
- mysql - MySQL 跳过 auto_increment 值(续)
- r - 删除一行中的重复元素并找到元素数量的比率
- javascript - Unknow grant_type 状态码 401 TrustPilot 电子邮件邀请认证
- html - HTML Living Standard 刚刚删除了与应用程序缓存相关的代码/文档。这是否意味着它已完全弃用?
- java -
在 从 2 迁移到 Camel 3+ - css - 位置:Chrome中的粘性渲染错误