Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sam build exception when trying to use dynamic resources #1293

Closed
chizou opened this issue Jul 25, 2019 · 2 comments
Closed

sam build exception when trying to use dynamic resources #1293

chizou opened this issue Jul 25, 2019 · 2 comments
Labels
area/build sam build command blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale.

Comments

@chizou
Copy link

chizou commented Jul 25, 2019

Due to my issues with #1292, I tried to ditch Refing the SSM value and use dynamic resources to access the value instead. My template snippet looks like this:

  CfDeployer:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: lambdas/cf_deployer/
      Layers: '{{resolve:ssm:/layers/orgfunctions:1}}'
      Policies:
        - Version: "2012-10-17"
          Statement:
            - Effect: Allow
              Action: "sts:AssumeRole"
              Resource: "*"
      Timeout: 300

Running sam build gives me the this error: samcli.commands.validate.lib.exceptions.InvalidSamDocumentException: [InvalidResourceException('CfDeployer', "Type of property 'Layers' is invalid.")] ('CfDeployer', "Type of property 'Layers' is invalid.")

Running sam package does seem to work correctly

@awood45 awood45 added area/build sam build command stage/needs-investigation Requires a deeper investigation labels Aug 5, 2019
@moelasmar
Copy link
Contributor

Layers property accepts value of type List, and not of type string. Please check the documentation here

@moelasmar moelasmar added blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. and removed stage/needs-investigation Requires a deeper investigation maintainer/need-response labels Nov 15, 2021
@xazhao
Copy link
Contributor

xazhao commented Dec 6, 2021

Closing because it has been inactive for a while. Feel free to reopen it if you have any other questions.

@xazhao xazhao closed this as completed Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build sam build command blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale.
Projects
None yet
Development

No branches or pull requests

5 participants