我正在尝试使用 CodeStar 部署计划的 AWS Lambda 函数。我从 CodeStart 的网络服务器模板开始,并修改了 template.yml 以使用预定的事件。
AWSTemplateFormatVersion: 2010-09-09
Transform:
- AWS::Serverless-2016-10-31
- AWS::CodeStar
Parameters:
ProjectId:
Type: String
Description: AWS CodeStar projectID used to associate new resources to team members
Resources:
HelloWorld:
Type: AWS::Serverless::Function
Properties:
Handler: app.handler
Runtime: nodejs6.10
Role:
Fn::ImportValue:
!Join ['-', [!Ref 'ProjectId', !Ref 'AWS::Region','LambdaTrustRole']]
Events:
MyEvent:
Type: Schedule
Properties:
Schedule: rate(5 minutes)
我已将策略附加CloudWatchEventsFullAccess
到角色CodeStarWorker-xxxxx-CloudFormation
以允许events:PutRule
.
当我启动 CodePipeline 时,我在部署阶段(CloudFormation)最终收到错误消息:
CREATE_FAILED AWS::CodeStar::SyncResources SyncResources1493352569577 com.amazon.coral.service.InternalFailure