Error occurs when start an instance AWS OpsWorks

Error occurs when start an instance AWS OpsWorks

When I start a new instance on OpsWorks Layers, I faced this error.

================================================================================
Recipe Compile Error in /var/lib/aws/opsworks/cache.stage2/cookbooks/aws/resources/cloudwatch.rb
================================================================================

NoMethodError
-------------
undefined method `property' for #<Class:0x007f511b6ee538>

Cookbook Trace:
---------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/aws/resources/cloudwatch.rb:1:in `class_from_file'

Relevant File Content:
----------------------
/var/lib/aws/opsworks/cache.stage2/cookbooks/aws/resources/cloudwatch.rb:

1>> property :alarm_name, String, name_property: true
2: property :alarm_description, String
3: property :actions_enabled, TrueClass
4: property :ok_actions, Array, default: []
5: property :alarm_actions, Array, default: []
6: property :insufficient_data_actions, Array, default: []
7: property :metric_name, String
8: property :namespace, String
9: property :statistic, equal_to: %w(SampleCount Average Sum Minimum Maximum)
10: property :extended_statistic, String

I got a panic….
Because it certainly worked fine when I start an instance before a couple of hours…

I had found a solution.
Finally I found it.

That’s why AWS cookbook updated.

My OpsWorks system used chef11.
When AWS cookbook updated 6.1.0, it has used new method, property.

I specified a version of AWS cookbook on my Berkshelf

Finally it works well.

글쓴이

Kwon

github: https://github.com/9to6