Class: Jets::Resource::Lambda::LayerVersion

Inherits:
Base
  • Object
show all
Defined in:
lib/jets/resource/lambda/layer_version.rb

Direct Known Subclasses

GemLayer

Instance Method Summary collapse

Methods inherited from Base

#replacements, #resource

Instance Method Details

#definitionObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/jets/resource/lambda/layer_version.rb', line 13

def definition
  {
    layer_version_logical_id => {
      type: "AWS::Lambda::LayerVersion",
      properties: {
        content: {
          s3_bucket: s3_bucket,
          s3_key: code_s3_key,
        },
        description: description,
        layer_name: layer_name,
        license_info: "MIT",
      }
    }
  }
end

#layer_version_logical_idObject



34
35
36
# File 'lib/jets/resource/lambda/layer_version.rb', line 34

def layer_version_logical_id
  self.class.name.split('::').last
end

#outputsObject



38
39
40
41
42
# File 'lib/jets/resource/lambda/layer_version.rb', line 38

def outputs
  {
    logical_id => "!Ref #{logical_id}",
  }
end

#s3_bucketObject



30
31
32
# File 'lib/jets/resource/lambda/layer_version.rb', line 30

def s3_bucket
  "!Ref S3Bucket"
end