Invalid Bucket name when creating s3 bucket with AWS SDK

0 votes

I tried to create a S3 bucket(thisIsTestBucket190) via AWS SDK (Node) and came across Invalid bucket name exception.

{ InvalidBucketName: The specified bucket is not valid.
    at Request.extractError (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/services/s3.js:577:35)
    at Request.callListeners (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at Request.emit (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/niro273/Desktop/data-lake/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
  message: 'The specified bucket is not valid.',
  code: 'InvalidBucketName',
  region: null,
  time: 2018-03-29T04:51:02.692Z,
  requestId: '5D487CF96846EFE2',
  extendedRequestId: '1TzPeOv4c7zq+H+GV5kFMFO3Y6awoS79VCuf4C7lUmy/IucNEfbINEfEIiNp/Esz7t38ckYZbrU=',
  cfId: undefined,
  statusCode: 400,
  retryable: false,
  retryDelay: 34.88207359966853 }

Would be great if I could know what is the root cause.

Aug 30, 2018 in AWS by bug_seeker
• 14,980 points
158 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

AWS provides naming standards when naming an aws bucket.

  • The bucket name can be between 3 and 63 characters long, and can contain only lower-case characters, numbers, periods, and dashes.

  • Each label in the bucket name must start with a lowercase letter or number.

  • The bucket name cannot contain underscores, end with a dash, have consecutive periods, or use dashes adjacent to periods.

  • The bucket name cannot be formatted as an IP address (198.51.100.24).

The name provided contains upper case letters, by switching to lower case letters the issue can be resolved.

https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-s3-bucket-naming-requirements.html

answered Aug 30, 2018 by Priyaj
• 56,140 points

Related Questions In AWS

+1 vote
2 answers

Want my AWS s3 Bucket to read Name from CloudWatch Event

CloudTrail events for S3 bucket level operations ...READ MORE

answered May 28, 2018 in AWS by Cloud gunner
• 4,240 points
132 views
0 votes
1 answer

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

This is a known deficiency. The best ...READ MORE

answered Sep 4, 2018 in AWS by Archana
• 4,090 points
590 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

AWS S3 uploading hidden files by default

versioning is enabled in your bucket. docs.aws.amazon.com/AmazonS3/latest/user-guide/….... the ...READ MORE

answered Oct 4, 2018 in AWS by Priyaj
• 56,140 points
109 views
0 votes
1 answer

How to decrypt the encrypted S3 file using aws-encryption-cli --decrypt

Use command : aws s3 presign s3://mybucket/abc_count.png you get ...READ MORE

answered Oct 22, 2018 in AWS by Priyaj
• 56,140 points
219 views
0 votes
1 answer

Import my AWS credentials using python script

Using AWS Cli  Configure your IAM user then ...READ MORE

answered Nov 16, 2018 in AWS by Jino
• 5,520 points
134 views
0 votes
2 answers
0 votes
1 answer

Create AWS s3 bucket with null region

It is almost similar and It occurs ...READ MORE

answered Oct 31, 2018 in AWS by Priyaj
• 56,140 points
136 views
+1 vote
1 answer

Create S3 bucket using Java AWS SDK

Hey @Anjali, Creating a bucket using Java AWS-SDK ...READ MORE

answered Jan 23 in AWS by Priyaj
• 56,140 points
60 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.