lambda_wrap 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98ee667b2542e6038199912bdc0de458e1fde4df
4
- data.tar.gz: ad831bfab87d807d2eb118e76f722f519a90b49e
3
+ metadata.gz: 968d0abf96da7f8ccaca5164f36f76308cd9cd68
4
+ data.tar.gz: bf713d811f0e651517805279a695b94bd3e6f5ed
5
5
  SHA512:
6
- metadata.gz: eef59955d10e5a0384e739f5c2d6bb9af2c299a85a14bfac41a138ce555569c0a657e4421bf1dad2bab85c68fac3e5871d832bedf57e8f8df6fba1e1c57e1a76
7
- data.tar.gz: d16cb1f4fbbe4372d5624c2204bd5d212d569bd436e5dc8734551a15c2dd795eff9a22fb616522750aba866cd3cbbac94f19b932af834e1fe14e088eed6f2195
6
+ metadata.gz: a6824f28666d4c663f6359a60af333a706c4f11d13b93831b7c4e332b077f817054b837346993f7ef8a95de02ec12c43057665c41dc4f1a3f5c7308ab820ea51
7
+ data.tar.gz: 68192a3f0c04ec0b0d33cfb22d1b73a4148b2812776cfc375d586e45b1cd95fd9c7b3b32a84e09223b4fa1c485faa7740951adbcf6777b54d4f07b129dd44627
@@ -80,7 +80,9 @@ module LambdaWrap
80
80
  # [handler] The handler that should be executed for this lambda function.
81
81
  # [lambda_role] The arn of the IAM role that should be used when executing the lambda function.
82
82
  # [lambda_description] The description of the lambda function.
83
- def deploy_lambda(bucket, key, version_id, function_name, handler, lambda_role, lambda_description = "Deployed with LambdaWrap")
83
+ # [vpc_subnet_ids] A list of subnet ids for the lambda's VPC configuration. All of the subnets must be on the same VPC.
84
+ # [vpc_security_group_ids] A list of security group ids for the lambda's VPC configuration. All of the security_group_ids must be on the same VPC.
85
+ def deploy_lambda(bucket, key, version_id, function_name, handler, lambda_role, lambda_description = "Deployed with LambdaWrap", vpc_subnet_ids = [], vpc_security_group_ids = [])
84
86
 
85
87
  # create or update function
86
88
 
@@ -91,7 +93,7 @@ module LambdaWrap
91
93
  func_version = func_config.version
92
94
  raise 'Error while publishing existing lambda function ' + function_name if !func_config.version
93
95
  rescue Aws::Lambda::Errors::ResourceNotFoundException
94
- func_config = @client.create_function({function_name: function_name, runtime: 'nodejs4.3', role: lambda_role, handler: handler, code: { s3_bucket: bucket, s3_key: key }, timeout: 5, memory_size: 128, publish: true, description: lambda_description}).data
96
+ func_config = @client.create_function({function_name: function_name, runtime: 'nodejs4.3', role: lambda_role, handler: handler, code: { s3_bucket: bucket, s3_key: key }, timeout: 5, memory_size: 128, publish: true, description: lambda_description, vpc_config: {subnet_ids: vpc_subnet_ids, security_group_ids: vpc_security_group_ids} }).data
95
97
  puts func_config
96
98
  func_version = func_config.version
97
99
  raise 'Error while publishing new lambda function ' + function_name if !func_config.version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lambda_wrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Thurner
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-14 00:00:00.000000000 Z
12
+ date: 2016-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk