Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions samcli/commands/local/lib/sam_function_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ def _parse_layer_info(list_of_layers, resources):
"""
layers = []
for layer in list_of_layers:
if isinstance(layer, dict) and layer.get("Fn::Sub"):
LOG.warning("'!Sub' keyword in Layer configuration does not work at local. "
"Please replace all parameter strings(like '${AWS::Region}') with the original value "
"and remove '!Sub' keyword from template.yaml .")

# If the layer is a string, assume it is the arn
if isinstance(layer, six.string_types):
layers.append(LayerVersion(layer, None))
Expand Down