What happened
Running make deploy fails during Terraform apply while creating the two S3 buckets. Both aws_s3_bucket resources error with:
api error MalformedXML: The XML you provided was not well-formed or did not validate against our published schema
Logs / Error output
aws_s3_bucket.lambda_code_bucket: Creating...
╷
│ Error: creating S3 Bucket (shipment-picture-bucket-valued-lab): operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: 89c46971-c3a6-4bc7-a427-9d3ad7aa1ae3, HostID: s9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=, api error MalformedXML: The XML you provided was not well-formed or did not validate against our published schema
│
│ with aws_s3_bucket.shipment_picture_bucket,
│ on main.tf line 33, in resource "aws_s3_bucket" "shipment_picture_bucket":
│ 33: resource "aws_s3_bucket" "shipment_picture_bucket" {
│
╵
╷
│ Error: creating S3 Bucket (shipment-picture-lambda-validator-bucket-valued-lab): operation error S3: CreateBucket, https response error StatusCode: 400, RequestID: ec5ea903-b870-4091-b37e-cd187bf81305, HostID: s9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=, api error MalformedXML: The XML you provided was not well-formed or did not validate against our published schema
│
│ with aws_s3_bucket.lambda_code_bucket,
│ on main.tf line 69, in resource "aws_s3_bucket" "lambda_code_bucket":
│ 69: resource "aws_s3_bucket" "lambda_code_bucket" {
│
╵
Terraform code involved
resource "aws_s3_bucket" "shipment_picture_bucket" {
bucket = "shipment-picture-bucket-${random_pet.random_name.id}"
force_destroy = true
lifecycle {
prevent_destroy = false
}
}
resource "aws_s3_bucket" "lambda_code_bucket" {
bucket = "shipment-picture-lambda-validator-bucket-${random_pet.random_name.id}"
force_destroy = true
lifecycle {
prevent_destroy = false
}
}
Expected behavior
make deploy should successfully create both buckets and proceed with the rest of the deployment.
Actual behavior
Terraform fails to create both buckets with MalformedXML on CreateBucket(400).
What happened
Running
make deployfails during Terraform apply while creating the two S3 buckets. Bothaws_s3_bucketresources error with:api error MalformedXML: The XML you provided was not well-formed or did not validate against our published schemaLogs / Error output
Terraform code involved
Expected behavior
make deployshould successfully create both buckets and proceed with the rest of the deployment.Actual behavior
Terraform fails to create both buckets with
MalformedXMLonCreateBucket(400).