aws / aws/aws-cdk

route53: wrong template generation when routing traffic to an Amazon VPC interface endpoint

Open
#22,215 4 comments 1 reaction 0 assignees View on GitHub
@aws-cdk/aws-route53 bug p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Expected Behavior

A HostedZone must be created and two RecordSets/ARecords within it.

### Current Behavior

Error by deployment:

"Template format error: Every Value member must be a string"

### Additional Information/Context

2.43.1
[10.0.0,11.0.0)
2.17.280
1.12.309

```
JavaCode:

context.basics.s3Endpoint = InterfaceVpcEndpoint.Builder
.create(this, id4res(stage, "s3endpoint"))
.vpc(context.basics.vpc)
.service(InterfaceVpcEndpointAwsService.S3)
.subnets(SubnetSelection.builder()
.subnetType(SubnetType.PUBLIC)
.build())
.securityGroups(List.of(context.basics.sg))
.privateDnsEnabled(false)
.build();

context.basics.hostedZone = HostedZone.Builder.create(this, id4res(stage, "myzone-hz"))
.zoneName("myzone.aws")
.comment("My Hosted Zone")
.vpcs(List.of(context.basics.vpc))
.build();

ARecord.Builder.create(this, id4res(stage, "myzone-rs1"))
.comment("S3 Endpoint - default")
.zone(context.basics.hostedZone)
.recordName(context.basics.hostedZone.getZoneName())
.target(RecordTarget.fromAlias(new InterfaceVpcEndpointTarget(context.basics.s3Endpoint)))
.build();
```

### CDK CLI Version

2.43.1

### Framework Version

_No response_

### Node.js Version

Node.js v14.16.0

### OS

Windows

### Language

Java

### Language Version

_No response_

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported Java configuration with InterfaceVpcEndpoint, HostedZone, and ARecord, then inspect the generated template around the Route 53 alias target. Verify the generated HostedZone and two RecordSets/ARecords, and confirm deployment no longer reports that every Value member must be a string.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, java, typescript
Domain
cloud, infrastructure
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.