Serverless Deploy Error

Hi I tried to run serverless deploy but I get the error on my terminal
Could not locate deployment bucket. Error: Profile development does not exist
need help fixing it.

@lauragift21 can you please share our serverless.yml file here?

service: movieTriggers

provider:
  name: aws
  runtime: nodejs6.10
  stage: ${opt:stage, self:custom.defaultStage}
  profile: ${self:custom.profiles.${self:provider.stage}}
  region: us-east-2
  memorySize: 128
  timeout: 10
  deploymentBucket: sls-movie-triggers-deployments
  iamRoleStatements:
    - Effect: Allow
      Action: dynamodb:GetItem
      Resource: { "Fn::Join" : [ ":", [ "arn:aws:dynamodb:${self:provider.region}", { "Ref" : "AWS::AccountId" }, "table/${self:custom.moviesTableName}" ] ] }
  environment:
    MOVIES_TABLE_NAME: ${self:custom.moviesTableName}

functions:
  movietriggers:
    handler: index.handler
    events:
      - http:
          # This provides the endpoint `GET movies/{title}`
          path: movies/{rating}
          method: get
          cors: true

# you can add CloudFormation resource templates here
resources:
  Resources:
    # Create the Movies table, using as Primary Key <title>. No Sort Key is defined.
    MoviesTable:
      Type: "AWS::DynamoDB::Table"
      Properties:
        AttributeDefinitions:
          - AttributeName: "rating"
            AttributeType: "S"
        KeySchema:
          - AttributeName: "rating"
            KeyType: "HASH"
        ProvisionedThroughput:
          ReadCapacityUnits: "1"
          WriteCapacityUnits: "1"
        TableName: Movies

#    NewResource:
#      Type: AWS::S3::Bucket
#      Properties:
#        BucketName: my-new-bucket
#  Outputs:
#     NewOutput:
#       Description: "Description for the output"
#       Value: "Some output value"

custom:
  defaultStage: dev
  profiles:
    dev: development
  moviesTableName: Movies

Did you create the deployment bucket before trying to deploy?
You need to create it manually prior to deploying, but then can use the same bucket for all your deployments.

1 Like

No I don’t think I did any idea how I can do this?

via the aws console would be the simplest

If you look at the error message it is clear that serverless CLI cannot find the profile development. Make sure that a profile section with name development exists in the ~/.aws/credentials file on your machine. Let me know.