aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

AWS::S3::Bucket `BucketName` required?

Open
#1,405 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::S3::Bucket

### Resource Name

_No response_

### Issue Description

The `AWS::S3::Bucket` resource's [`BucketName`](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-name) property is marked a optional (with a CFN generating a name if none is specified) but when attempting to create a bucket with no specified name via the Cloud Control API we get an [error](https://github.com/hashicorp/terraform-provider-awscc/issues/701#issuecomment-1287507902):

```
$ aws cloudcontrol create-resource --type-name "AWS::S3::Bucket" --desired-state "{}"
{
"ProgressEvent": {
"TypeName": "AWS::S3::Bucket",
"RequestToken": "4cad2849-512e-4f39-991e-90040fbba509",
"Operation": "CREATE",
"OperationStatus": "IN_PROGRESS",
"EventTime": "2022-10-21T18:42:47.219000-04:00"
}
}

$ aws cloudcontrol get-resource-request-status --request-token "4cad2849-512e-4f39-991e-90040fbba509"
{
"ProgressEvent": {
"TypeName": "AWS::S3::Bucket",
"RequestToken": "4cad2849-512e-4f39-991e-90040fbba509",
"Operation": "CREATE",
"OperationStatus": "FAILED",
"EventTime": "2022-10-21T18:42:47.684000-04:00",
"ErrorCode": "InternalFailure"
}
}
```

### Expected Behavior

Bucket created and a generated bucket name returned.

### Observed Behavior

Cloud Control API reports `InternalError`

### Test Cases

See above.

### Other Details

_No response_

Contributor guide

Open the contributing guide

Research direction

No repository file or test is identified; start by reproducing the AWS Cloud Control API request and comparing it with the CloudFormation behavior and property documentation. Done means creating AWS::S3::Bucket without BucketName succeeds and returns a generated name instead of InternalError.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.