Error setting up CloudFoundry 2 on AWS (AWS::S3::Errors::AccessDenied)

怎甘沉沦 提交于 2019-12-25 01:44:36

问题


After watching this awesome demo video, I've been trying to setup a CloudFoundry2 installation on AWS according to the docs and keep running into issues.

I'm on OS X, so I ended up installing rbenv and Ruby v 1.9.3-p327, but now I can't follow the guide and am not sure how to proceed. I get the following error when trying to run bosh aws create to provision the Amazon services:

→ bosh aws create
/Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/aws-sdk-1.8.5/lib/aws/core/client.rb:339:in `return_or_raise': Access Denied (AWS::S3::Errors::AccessDenied)
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/aws-sdk-1.8.5/lib/aws/core/client.rb:440:in `client_request'
    from (eval):3:in `get_object'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/aws-sdk-1.8.5/lib/aws/s3/s3_object.rb:1272:in `get_object'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/aws-sdk-1.8.5/lib/aws/s3/s3_object.rb:1058:in `read'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.5.0.pre.650/lib/bosh_cli_plugin_aws/s3.rb:51:in `block in fetch_object_contents'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.650/lib/common/retryable.rb:23:in `block in retryer'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.650/lib/common/retryable.rb:21:in `loop'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.650/lib/common/retryable.rb:21:in `retryer'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_common-1.5.0.pre.650/lib/common/common.rb:119:in `retryable'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.5.0.pre.650/lib/bosh_cli_plugin_aws/s3.rb:50:in `fetch_object_contents'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.5.0.pre.650/lib/bosh_cli_plugin_aws/migrator.rb:81:in `load_migrations_for_env'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.5.0.pre.650/lib/bosh_cli_plugin_aws/migrator.rb:35:in `environment_migrations'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.5.0.pre.650/lib/bosh_cli_plugin_aws/migrator.rb:40:in `needs_migration?'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.5.0.pre.650/lib/bosh_cli_plugin_aws/migrator.rb:11:in `migrate'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli_plugin_aws-1.5.0.pre.650/lib/bosh/cli/commands/aws.rb:125:in `create'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli-1.5.0.pre.650/lib/cli/command_handler.rb:57:in `run'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli-1.5.0.pre.650/lib/cli/runner.rb:59:in `run'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli-1.5.0.pre.650/lib/cli/runner.rb:18:in `run'
    from /Users/dave/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bosh_cli-1.5.0.pre.650/bin/bosh:7:in `<top (required)>'
    from /Users/dave/.rbenv/versions/1.9.3-p327/bin/bosh:23:in `load'
    from /Users/dave/.rbenv/versions/1.9.3-p327/bin/bosh:23:in `<main>'

I'd really like to avoid manually setting up all the AWS components if possible, but if needs be I can go that route (assuming there's some good documentation to follow).

Bosh Details

→ gem list bosh 

*** LOCAL GEMS ***

bosh (1.3.0)
bosh_aws_cpi (1.5.0.pre.650)
bosh_cli (1.5.0.pre.650, 1.0.3)
bosh_cli_plugin_aws (1.5.0.pre.650)
bosh_cli_plugin_micro (1.5.0.pre.650)
bosh_common (1.5.0.pre.650, 0.5.4)
bosh_cpi (1.5.0.pre.650)
bosh_openstack_cpi (1.5.0.pre.650)
bosh_registry (1.5.0.pre.650)
bosh_vcloud_cpi (1.5.0.pre.650)
bosh_vsphere_cpi (1.5.0.pre.650)

Additional bosh info (probably not relevant, given I haven't deployed anything

→  bosh status 
Config
             /Users/dave/.bosh_config

Director
  not set

Deployment
  not set

Any help would be appreciated. Thanks!


回答1:


Turns out that the issue was that the S3 bucket that is created is generated from the BOSH_VPC_SUBDOMAIN you enter and has to be unique. Changing that to something very specific worked for me.



来源:https://stackoverflow.com/questions/16653901/error-setting-up-cloudfoundry-2-on-aws-awss3errorsaccessdenied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!