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.