Class: LambdaDeployment::Lambda::Deploy
- Inherits:
-
Object
- Object
- LambdaDeployment::Lambda::Deploy
- Defined in:
- lib/lambda_deployment/lambda/deploy.rb
Defined Under Namespace
Classes: ArchiveMissingError
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.
6 7 8 9 |
# File 'lib/lambda_deployment/lambda/deploy.rb', line 6 def initialize(config) @config = config @client = LambdaDeployment::Client.new(config.region) end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/lambda_deployment/lambda/deploy.rb', line 11 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 |