# CircleCI - '\*\*\* should be a either a deploy section with commands' is what?

**URL:** <https://discuss.circleci.com/t/circleci-should-be-a-either-a-deploy-section-with-commands-is-what/4935>\
**Category:** Deployments\
**Tags:** aws, circle-yml\
**Created:** [July 2, 2016, 5:38pm UTC](https://discuss.circleci.com/t/circleci-should-be-a-either-a-deploy-section-with-commands-is-what/4935 "2016-07-02T17:38:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hardreggaecafe](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/hardreggaecafe/32/27208_2.png) [@hardreggaecafe](https://discuss.circleci.com/u/hardreggaecafe)\
**Post date:** [July 2, 2016, 5:38pm UTC](https://discuss.circleci.com/t/circleci-should-be-a-either-a-deploy-section-with-commands-is-what/4935/1 "2016-07-02T17:38:36Z")

</div>

I’m configuring CirclCI. And trying to sync Github to AWS-EC2. When I committed to pushed to github repo, CircleCI showed some error like this.

 ![](https://global.discourse-cdn.com/circleci/original/3X/f/c/fcd148f3706cec9bf0d7a5b36aa95bdb3d34e16c.png)

Here’s circle.yml config.

```
test:
  override:
    - exit 0
deployment:
  staging:
    branch: develop-citest
    region: ap-northeast-1
    codedeploy:
      w***r-ma:
        application_root: /home/adbase/
        revision_location:
          revision_type: S3
          s3_location:
            bucket: w **** r-vm-dev
            key_pattern: w **** r-{BRANCH}-{SHORT_COMMIT}
        deployment_group: staging-instance-group
        deployment_config: CodeDeployDefault.AllAtOnce
```

---

<div class="post-metadata">

**Author:** ![FelicianoTech](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/felicianotech/32/21348_2.png) [@FelicianoTech](https://discuss.circleci.com/u/FelicianoTech)\
**Post date:** [July 2, 2016, 8:21pm UTC](https://discuss.circleci.com/t/circleci-should-be-a-either-a-deploy-section-with-commands-is-what/4935/2 "2016-07-02T20:21:36Z")

</div>

Hi,

Can you try moving the region line:

> [@hardreggaecafe](#):
>
> region: ap-northeast-1

Under the app key?

So something like this:

```auto
test:
  override:
    - exit 0
deployment:
  staging:
    branch: develop-citest
    codedeploy:
      w***r-ma:
        application_root: /home/adbase/
        region: ap-northeast-1
        revision_location:
          revision_type: S3
          s3_location:
            bucket: w **** r-vm-dev
            key_pattern: w **** r-{BRANCH}-{SHORT_COMMIT}
        deployment_group: staging-instance-group
        deployment_config: CodeDeployDefault.AllAtOnce

```

---

<div class="post-metadata">

**Author:** ![hardreggaecafe](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/hardreggaecafe/32/27208_2.png) [@hardreggaecafe](https://discuss.circleci.com/u/hardreggaecafe)\
**Post date:** [July 3, 2016, 1:11am UTC](https://discuss.circleci.com/t/circleci-should-be-a-either-a-deploy-section-with-commands-is-what/4935/3 "2016-07-03T01:11:10Z")

</div>

> [@FelicianoTech](#):
>
> region: ap-northeast-1

Thank you for the advise.  
After modifying circle.yml, another error comes up below.

```
create_application_revision /tmp/codedeploy_applications.json /tmp/codedeploy_revisions.json
create_application_revision loaded: {"applications":[{"application_root":"/home/adbase","region":"ap-northeast-1","revision_location":{"revisionType":"S3","s3Location":{"bucket":" ****-vm-dev","key":"**** ma-develop-citest-6e3348f"}},"deployment_group":"staging-instance-group","deployment_config":"CodeDeployDefault.AllAtOnce","application_name":" **** -ma"}]}
Bundling ****-ma from /home/ubuntu/**** /home/adbase
Failed to upload to {u'bucket': u' ****-vm-dev', u'key': u'**** ma-develop-citest-6e3348f'} in ap-northeast-1. Check:
1) Your S3 bucket is in ap-northeast-1
2) The S3 location is correct for your app
3) Your AWS credentials are correct
Unhandled exception
S3ResponseError: 403 Forbidden
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>2229208B1EC3C86D</RequestId><HostId>Kc7gRJyqQe0oKUwP8dC3PZ1qJRVDb0COEl5wa55nV2U4V/EJGVSLw4fa5fiZpZlirVzsl6n9nsg=</HostId></Error>

((create_application_revision "/tmp/codedeploy_applications.json" "/tmp/codedeploy_revisions.json")) returned exit code 1

Action failed: Create new revision of **** -ma

```

Is this a matter of permission of S3? I’m not so sure about S3’s access control. Any hints is welcomed.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:41am UTC](https://discuss.circleci.com/t/circleci-should-be-a-either-a-deploy-section-with-commands-is-what/4935/4 "2018-06-18T11:41:03Z")

</div>

Closed on June 18, 2018, 11:41am UTC


