3

そのため、さまざまな環境に複数のアカウントを持っています。新しいステージを作成しようとすると、「バケットが存在します。権限がありません」というメッセージが表示されます。AWS のアクセス許可を確認した後、私の開発とテストは同一です。なぜこれが起こるのでしょうか?

開発に関しては、作成に問題はありませんでした。cf、s3 バケット、sls フォルダー内のプロジェクト。

テストでは、上記のエラーが発生します。バケットは存在しませんが、バケットが存在すると表示され、権限がありません。

ファーストラン:

yaos-imac:serverless yao$ sls project create
 _______                             __
|   _   .-----.----.--.--.-----.----|  .-----.-----.-----.
|   |___|  -__|   _|  |  |  -__|   _|  |  -__|__ --|__ --|
|____   |_____|__|  \___/|_____|__| |__|_____|_____|_____|
|   |   |             The Serverless Application Framework
|       |                           serverless.com, v0.5.0
`-------'

Serverless: Initializing Serverless Project...
Serverless: Enter a name for this project:  (serverless-vkkxnm) planet-express
Serverless: Enter a unique project bucket name (using a domain is recommended):  (serverless-vkkxnm.com) sls.planet-express.com
Serverless: Pick the primary region for your project:
  > us-east-1
    us-west-2
    eu-west-1
    ap-northeast-1
Serverless: Do you want to create a new stage and region for this project?
  > Yes
    No
Serverless: Enter a new stage name for this project:  dev
Serverless: For the "dev" stage, do you want to use an existing Amazon Web Services profile or create a new one?
  > Existing Profile
    Create A New Profile
Serverless: Select a profile for your project:
  > dev
    test
Serverless: Creating stage "dev"...
Serverless: Creating region "us-east-1" in stage "dev"...
Serverless: Deploying resources to stage "dev" in region "us-east-1" via Cloudformation (~3 minutes)...
Serverless: / Serverless: Creating your project bucket on S3: sls.planet-express.com...
Serverless: Successfully deployed "dev" resources to "us-east-1"
Serverless: Successfully created region "us-east-1" within stage "dev"
Serverless: Successfully created stage "dev"
Serverless: Successfully initialized project "planet-express"

今、私は新しいステージを作成しようとしています:

yaos-imac:planet-express yao$ sls stage create
Serverless: Enter a new stage name for this project:  test
Serverless: For the "test" stage, do you want to use an existing Amazon Web Services profile or create a new one?
  > Existing Profile
    Create A New Profile
Serverless: Select a profile for your project:
    dev
  > test
Serverless: Creating stage "test"...
Serverless: Select a new region for your existing stage:
  > us-east-1
    us-west-2
    eu-west-1
    ap-northeast-1
Serverless: Creating region "us-east-1" in stage "test"...
Serverless: Deploying resources to stage "test" in region "us-east-1" via Cloudformation (~3 minutes)...
/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:49
        fn = function () { throw arg; };
                           ^

ServerlessError: ServerlessError: S3 Bucket "sls.planet-express.com" already exists and you do not have permissions to use it
    at new ServerlessError (/Users/yao/.node/lib/node_modules/serverless/lib/Error.js:17:11)
    at ResourcesDeploy.<anonymous> (/Users/yao/.node/lib/node_modules/serverless/lib/actions/ResourcesDeploy.js:252:21)
    at ResourcesDeploy.tryCatcher (/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:503:31)
    at Promise._settlePromise (/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:560:18)
    at Promise._settlePromise0 (/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:605:10)
    at Promise._settlePromises (/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/promise.js:680:18)
    at Async._drainQueue (/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:126:16)
    at Async._drainQueues (/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:136:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/Users/yao/.node/lib/node_modules/serverless/node_modules/bluebird/js/release/async.js:16:14)
    at processImmediate [as _immediateCallback] (timers.js:368:17)
4

1 に答える 1