# AWS - OPSWorks Question

**URL:** <https://discourse.chef.io/t/aws-opsworks-question/4363>\
**Category:** Chef Infra (archive)\
**Created:** [August 26, 2013, 11:26pm UTC](https://discourse.chef.io/t/aws-opsworks-question/4363 "2013-08-26T23:26:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jennifer\_Fountain](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jennifer_fountain/32/63_2.png) [@Jennifer\_Fountain](https://discourse.chef.io/u/Jennifer_Fountain)\
**Post date:** [August 26, 2013, 11:26pm UTC](https://discourse.chef.io/t/aws-opsworks-question/4363/1 "2013-08-26T23:26:56Z")

</div>

Ohai!

I am not sure if this is the correct place to ask but my googlefu is coming up empty on this one. I am trying to set the environment on my opsworks stack and it’s not working correctly. Here is the json I applied to the stack:

{  
“chef\_environment”: “production”  
}

This is the output of this: Chef::Log.info “Updating environment #{node.chef\_environment}”

[2013-08-26T23:09:56+00:00] INFO: Updating environment \_default

I am not sure what I am missing. If anyone is familiar with opsworks/chef, any help is appreciated!

Thanks!  
Jenn

---

<div class="post-metadata">

**Author:** ![Ranjib](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/ranjib/32/1040_2.png) [@Ranjib](https://discourse.chef.io/u/Ranjib)\
**Post date:** [August 27, 2013, 12:56am UTC](https://discourse.chef.io/t/aws-opsworks-question/4363/2 "2013-08-27T00:56:39Z")

</div>

you need to run chef client with -E production flag, or set the environment  
inside client.rb, as environment 'production'

On Mon, Aug 26, 2013 at 4:26 PM, Jenn Fountain [jfountain@meetme.com](mailto:jfountain@meetme.com) wrote:

> Ohai!
> 
> I am not sure if this is the correct place to ask but my googlefu is  
> coming up empty on this one. I am trying to set the environment on my  
> opsworks stack and it's not working correctly. Here is the json I  
> applied to the stack:
> 
> {  
> "chef\_environment": "production"  
> }
> 
> This is the output of this: Chef::Log.info "Updating environment  
> #{node.chef\_environment}"
> 
> [2013-08-26T23:09:56+00:00] INFO: Updating environment \_default
> 
> I am not sure what I am missing. If anyone is familiar with  
> opsworks/chef, any help is appreciated!
> 
> Thanks!  
> Jenn
