Skip to content

No role creating when using referenced json #44

Description

@simon-dk

In my serverless.yml file I have two imported functions:

functions:
   - ${file(./test.json)}
   - ${file(./test.yml)}

Both are identical (different function names) but the function referenced in test.json only gets the global iamRole, while the .yml creates a role as expected.

//// test.json

{
  "convert": {
    "handler": "test.handler",
    "iamRoleStatements:": [
      {
        "Effect": "Allow",
        "Action": ["s3:GetObject"],
        "Resource": [
          "arn:aws:s3:::${cf:S3Stack-${self:custom.stage}.bucket}/*"        ]
      }
    ]
  }
}

I can't find any logical explanation for this, but would like to hear if this is fixable - i am one of those people who prefer json over yml :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions