Class: LambdaDeployment::Lambda::Deploy
- Inherits:
-
Object
- Object
- LambdaDeployment::Lambda::Deploy
- Defined in:
- lib/lambda_deployment/lambda/deploy.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Deploy
constructor
A new instance of Deploy.
- #run ⇒ Object
Constructor Details
#initialize(config) ⇒ Deploy
Returns a new instance of Deploy.
4 5 6 7 |
# File 'lib/lambda_deployment/lambda/deploy.rb', line 4 def initialize(config) @config = config @client = LambdaDeployment::Client.new(config.region) end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lambda_deployment/lambda/deploy.rb', line 9 def run upload_to_s3 update_function_code update_environment update_concurrency return unless @config.alias_name version = publish_version begin create_alias(version) rescue Aws::Lambda::Errors::ResourceConflictException update_alias(version) end end |