Skip to content

Unresolved resource dependencies #125

Open
@AnthonyWC

Description

@AnthonyWC

Using a combination of the alias + stepfunction plugin caused the following error:

(I am guessing that alias plugin doesn't understand that stepfunction plugin has changed the resource name, e.g. - to Dash)

/app # serverless deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Tracing ENABLED for function "dataeng-buildkite-test"
AWS Pseudo Parameters
AWS Pseudo Parameter: Resources::IamRoleLambdaExecution::Properties::Policies::0::PolicyDocument::Statement::3::Resource Replaced AWS::Region wi
th ${AWS::Region}
AWS Pseudo Parameter: Resources::IamRoleLambdaExecution::Properties::RoleName::Fn::Join::1::2 Replaced AWS::Region with ${AWS::Region}
AWS Pseudo Parameter: Resources::IamRoleStateMachineExecution::Properties::AssumeRolePolicyDocument::Statement::0::Principal::Service Replaced A
WS::Region with ${AWS::Region}
AWS Pseudo Parameter: Resources::IamRoleStateMachineExecution::Properties::Policies::0::PolicyName Replaced AWS::Region with ${AWS::Region}
AWS Pseudo Parameter: Resources::DataengDashbuildkiteDashtest::Properties::DefinitionString Replaced AWS::Region with ${AWS::Region}
AWS Pseudo Parameter: Resources::DataengDashbuildkiteDashtest::Properties::DefinitionString Replaced AWS::AccountId with ${AWS::AccountId}
AWS Pseudo Parameter: Resources::DataengDashsitetrackerDashrtDashatDashingestScheduleToStepFunctionsRole::Properties::Policies::0::PolicyName Re
placed AWS::Region with ${AWS::Region}
Serverless: Preparing alias ...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (29.34 MB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
...........
Serverless: Stack update finished...
Serverless: Uploading CloudFormation alias file to S3...
Serverless: Updating alias stack...
 
  Serverless Error ---------------------------------------
 
  Template format error: Unresolved resource dependencies [DataengDashbuildkiteDashtestAlias, DataengDashsitetrackerDashrtDashatDashingestSchedu
leToStepFunctionsRoleAlias] in the Resources block of the template
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           8.11.2
     Serverless Version:     1.27.3

---
service: dataeng-buildkite-test

provider:
  name: aws
  runtime: nodejs8.10
  stage: dev
  region: us-east-1
  tracing: true
  iamRoleStatements:
    - Sid: CloudWatchLog
      Effect: Allow
      Action:
        - logs:*
      Resource:
        "arn:aws:logs:::*"

functions:
  default:
    name: ${self:service}
    handler: src/index.handler

stepFunctions: ${file(./state-machine.yml)}
---
stateMachines:
  dataeng-state-machine:
    name: "${self:service}"
    definition:
      Comment: "Test stage"
      StartAt: LoadConfiguration
      States:
        LoadConfiguration:
          Type: Task
          Resource: arn:aws:lambda:#{AWS::Region}:#{AWS::AccountId}:function:dataeng-buildkite-test:${self:provider.stage}
          End: true

Also if step-function itself reference an alias version of the function; then deployment will also fail since the alias function has not been created yet; and one cannot deploy alias version of function without first deploying service. So I had to deploy the service w/o step-function first then add the step-function part also but it still fails w/ above.

Also opened issue here: serverless-operations/serverless-step-functions#127

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions