AWS Lambda与CodeStar一起安排:SyncResources com.amazon.coral.service.InternalFailure

时间:2017-04-28 04:42:04

标签: aws-lambda aws-codestar

我尝试使用CodeStar部署预定的AWS Lambda函数。 我已经从CodeStart的webserver模板开始,我已经修改了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

1 个答案:

答案 0 :(得分:0)

您的CloudFormation模板中没有资源与CodeStar相关,因此我认为删除顶部的“AWS :: CodeStar”行应修复它。