lambda_wrap 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lambda_wrap/lambda_manager.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 968d0abf96da7f8ccaca5164f36f76308cd9cd68
|
4
|
+
data.tar.gz: bf713d811f0e651517805279a695b94bd3e6f5ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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-
|
12
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk
|