To start off, you need an S3 bucket. To create one programmatically, you must first choose a name for your bucket. Remember that this name must be unique throughout the whole AWS platform, as bucket names are DNS compliant.
If you try to create a bucket, but another user has already claimed your desired bucket name, your code will fail. Instead of success, you will see the following error: botocore.errorfactory.BucketAlreadyExists
. You can increase your chance of success when creating your bucket by picking a random name. You can generate your own function that does that for you.
bdorsey327 on Feb. 2, 2020
I’m getting error’s about regarding boto3 not being able to locate credentials even though I’ve configured the profile, credentials and config with the correct info. Also, I’ve had to modify the script b/c of the us-east api issue in order to get it to create a bucket. The script provided in the video results in an error even with the if/else logic provided