You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"1 validation error detected: Value '[{layer_version_arn}]'"
597
600
+r" at 'layers' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 140, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: (arn:[a-zA-Z0-9-]+:lambda:[a-zA-Z0-9-]+:\d{12}:layer:[a-zA-Z0-9-_]+:[0-9]+)|(arn:[a-zA-Z0-9-]+:lambda:::awslayer:[a-zA-Z0-9-_]+), Member must not be null]",
f"User: arn:aws:iam::{account_id}:{user} is not authorized to perform: lambda:GetLayerVersion on resource: {layer_version_arn} because no resource-based policy allows the lambda:GetLayerVersion action"
620
626
)
621
-
iflayerisNone:
627
+
iflayerisNoneorlayer_versionisNone:
622
628
# Limitation: cannot fetch external layers when using the same account id as the target layer
623
629
# because we do not want to trigger the layer fetcher for every non-existing layer.
f"User: arn:aws:iam::{account_id}:{user} is not authorized to perform: lambda:GetLayerVersion on resource: {layer_version_arn} because no resource-based policy allows the lambda:GetLayerVersion action"
635
641
)
636
-
state.layers[layer_name] =layer
642
+
643
+
# Distinguish between new layer and new layer version
644
+
iflayer_versionisNone:
645
+
# Create whole layer from scratch
646
+
state.layers[layer_name] =layer
647
+
else:
648
+
# Create layer version if another version of the same layer already exists
649
+
state.layers[layer_name].layer_versions[
650
+
layer_version_str
651
+
] =layer.layer_versions.get(layer_version_str)
637
652
638
653
# only the first two matches in the array are considered for the error message
0 commit comments