{"action":"created","issue":{"url":"https://api.github.com/repos/boto/boto3/issues/821","repository_url":"https://api.github.com/repos/boto/boto3","labels_url":"https://api.github.com/repos/boto/boto3/issues/821/labels{/name}","comments_url":"https://api.github.com/repos/boto/boto3/issues/821/comments","events_url":"https://api.github.com/repos/boto/boto3/issues/821/events","html_url":"https://github.com/boto/boto3/issues/821","id":179031669,"number":821,"title":"opswork \"create_deployment\" region issue","user":{"login":"sahilsk","id":5857895,"avatar_url":"https://avatars.githubusercontent.com/u/5857895?v=3","gravatar_id":"","url":"https://api.github.com/users/sahilsk","html_url":"https://github.com/sahilsk","followers_url":"https://api.github.com/users/sahilsk/followers","following_url":"https://api.github.com/users/sahilsk/following{/other_user}","gists_url":"https://api.github.com/users/sahilsk/gists{/gist_id}","starred_url":"https://api.github.com/users/sahilsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahilsk/subscriptions","organizations_url":"https://api.github.com/users/sahilsk/orgs","repos_url":"https://api.github.com/users/sahilsk/repos","events_url":"https://api.github.com/users/sahilsk/events{/privacy}","received_events_url":"https://api.github.com/users/sahilsk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-24T14:01:28Z","updated_at":"2016-09-26T10:47:21Z","closed_at":null,"body":"Hi,\r\n\r\nopswork `create_deployment` is throwing an error saying \"instance not found\".\r\nMy instances are in `ap-southeast-1`. \r\n\r\n``` python\r\n           opswork = boto3.client('opsworks', region_name='us-east-1')\r\n            response = opswork.create_deployment(\r\n                  StackId=stack_id,\r\n                  AppId=app_id,\r\n                  InstanceIds=[instance_id],\r\n                  Command={\r\n                      'Name': 'update_custom_cookbooks'\r\n                  },\r\n                  Comment=('update custom cookbooks on %s' % instance_id)\r\n              )\r\n```\r\n\r\nError stack\r\n```\r\nStarting opswork deployment..\r\nTraceback (most recent call last):\r\n  File \"/Users/sonu.meena/.virtualenvs/aws-prod/lib/python2.7/site-packages/fabric/main.py\", line 756, in main\r\n    *args, **kwargs\r\n  File \"/Users/sonu.meena/.virtualenvs/aws-prod/lib/python2.7/site-packages/fabric/tasks.py\", line 427, in execute\r\n    results['<local-only>'] = task.run(*args, **new_kwargs)\r\n  File \"/Users/sonu.meena/.virtualenvs/aws-prod/lib/python2.7/site-packages/fabric/tasks.py\", line 174, in run\r\n    return self.wrapped(*args, **kwargs)\r\n  File \"/Users/sonu.meena/OLA/ddeployer/scripts/opswork/deploy_olamoney.py\", line 149, in canary_deploy\r\n    execute(opswork_deploy, app, [instance_id], False, dry_run)\r\n  File \"/Users/sonu.meena/.virtualenvs/aws-prod/lib/python2.7/site-packages/fabric/tasks.py\", line 427, in execute\r\n    results['<local-only>'] = task.run(*args, **new_kwargs)\r\n  File \"/Users/sonu.meena/.virtualenvs/aws-prod/lib/python2.7/site-packages/fabric/tasks.py\", line 174, in run\r\n    return self.wrapped(*args, **kwargs)\r\n  File \"/Users/sonu.meena/OLA/ddeployer/scripts/opswork/deploy_olamoney.py\", line 283, in opswork_deploy\r\n    Comment=('deploy on %s' % arr_inst_ids)\r\n  File \"/Users/sonu.meena/.virtualenvs/aws-prod/lib/python2.7/site-packages/botocore/client.py\", line 278, in _api_call\r\n    return self._make_api_call(operation_name, kwargs)\r\n  File \"/Users/sonu.meena/.virtualenvs/aws-prod/lib/python2.7/site-packages/botocore/client.py\", line 572, in _make_api_call\r\n    raise ClientError(parsed_response, operation_name)\r\nbotocore.exceptions.ClientError: An error occurred (ResourceNotFoundException) when calling the CreateDeployment operation: Unable to find instance with ID i-0f1326ab\r\n```\r\n\r\n\r\nIf i change the region to `ap-southeast-1` where instances are then i get stack not found error.\r\n\r\n           opswork = boto3.client('opsworks', region_name='ap-southeast-1')\r\n\r\n```\r\nbotocore.exceptions.ClientError: An error occurred (ResourceNotFoundException) when calling the CreateDeployment operation: Unable to find stack with ID xxxxxx-a7c2-xxx-934b-884dxxx7\r\n```\r\nWhat do i do make it work?"},"comment":{"url":"https://api.github.com/repos/boto/boto3/issues/comments/249538024","html_url":"https://github.com/boto/boto3/issues/821#issuecomment-249538024","issue_url":"https://api.github.com/repos/boto/boto3/issues/821","id":249538024,"user":{"login":"sahilsk","id":5857895,"avatar_url":"https://avatars.githubusercontent.com/u/5857895?v=3","gravatar_id":"","url":"https://api.github.com/users/sahilsk","html_url":"https://github.com/sahilsk","followers_url":"https://api.github.com/users/sahilsk/followers","following_url":"https://api.github.com/users/sahilsk/following{/other_user}","gists_url":"https://api.github.com/users/sahilsk/gists{/gist_id}","starred_url":"https://api.github.com/users/sahilsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahilsk/subscriptions","organizations_url":"https://api.github.com/users/sahilsk/orgs","repos_url":"https://api.github.com/users/sahilsk/repos","events_url":"https://api.github.com/users/sahilsk/events{/privacy}","received_events_url":"https://api.github.com/users/sahilsk/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T10:47:21Z","updated_at":"2016-09-26T10:47:21Z","body":"Raised an issue with AWS and found instance id should be opswork long instance id, not actual i-xxxx instance ids.\r\n\r\nQuoting here\r\n```\r\nGerardo P.:In OpsWorks, you should never use the EC2 Instance ID, everything refers to OpsWorks instance IDs4:15:44 PM\r\n\r\n```"}}
{"actor":{"display_login":"sahilsk"}}