Skip to content

Commit

Permalink
Layers support in CFN
Browse files Browse the repository at this point in the history
  • Loading branch information
kteague committed Jul 29, 2019
1 parent 7f26309 commit fbf1238
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/aim/cftemplates/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,17 @@ def __init__(self, aim_ctx, account_ctx, aws_region, aws_name, lambda_config, la
Description: "Boolean indicating whether an SDB Domain will be created to be used as a cache."
Type: String
Layers:
Description: "List of up to 5 Lambda Layer ARNs."
Type: CommaDelimitedList
Default: ""
{0[parameters]:s}
Conditions:
ReservedConcurrentExecutionsIsEnabled: !Not [!Equals [!Ref ReservedConcurrentExecutions, 0]]
SDBCacheIsEnabled: !Equals [!Ref EnableSDBCache, 'true']
LayersExist: !Not [!Equals [!Join ["", !Ref Layers], ""]]
Resources:
Expand Down Expand Up @@ -164,6 +170,11 @@ def __init__(self, aim_ctx, account_ctx, aws_region, aws_name, lambda_config, la
- !Ref ReservedConcurrentExecutions
- !Ref AWS::NoValue
Timeout: !Ref Timeout{0[environment]:s}
Layers:
!If
- LayersExist
- !Ref Layers
- !Ref AWS::NoValue
InvokePolicy:
Type: AWS::IAM::ManagedPolicy
Expand Down

0 comments on commit fbf1238

Please sign in to comment.