Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(route53): ability to create cross region alias to VPC interface endpoint #18758

Closed
2 tasks
pawelzebrowski opened this issue Feb 1, 2022 · 3 comments
Closed
2 tasks
Assignees
Labels
@aws-cdk/aws-route53 Related to Amazon Route 53 closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@pawelzebrowski
Copy link

Description

There doesn't appear to be any way to create a route53 alias targeting an Interface Endpoint in a different region

Use Case

  1. A Private Link endpoint is created in a VPC vpc-us-east-1 in us-east-1. The private link is only exposed in this region.
  2. A VPC vpc-us-west-2 is created in us-west-2 and peered with vpc-us-east-1. All routing is set up.
  3. A Private Zone needs to be created for vpc-us-west-2 with an alias record targeting the private link endpoint in vpc-us-east-1. This doesn't seem possible through CDK today (though possible through console).

Proposed Solution

Any viable solution that doesn't require aws-sdk or console. Some guesses:

Add region to ec2.InterfaceVpcEndpoint.fromInterfaceVpcEndpointAttributes (though i think fromInterfaceEndpointAttributes may not be compatible with new targets.InterfaceVpcEndpointTarget:

    new route53.ARecord(this, `new-record`, {
      zone: some-zone,
      recordName: 'some-record',
      target: route53.RecordTarget.fromAlias(
        new targets.InterfaceVpcEndpointTarget(
          ec2.InterfaceVpcEndpoint.fromInterfaceVpcEndpointAttributes(
            this,
            'some-interface-endpoint',
            {
              port: 443,
              vpcEndpointId: 'vpce-xxxxx',
              region: 'us-east-1'
            }
          )
        )
      ),
    });

Similar approach with bind():

    new route53.ARecord(this, `new-record`, {
      zone: some-zone,
      recordName: 'some-record',
      target: route53.RecordTarget.fromAlias({
        bind() {
          return {
            dnsName: 'private-link-endpoint-url',
            hostedZoneId: 'private-link-endpoint-hosted-zone',
          };
        },
      }),
    });

Other information

No response

Acknowledge

  • I may be able to implement this feature request
  • This feature might incur a breaking change
@pawelzebrowski pawelzebrowski added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 1, 2022
@github-actions github-actions bot added the @aws-cdk/aws-route53 Related to Amazon Route 53 label Feb 1, 2022
@peterwoodworth
Copy link
Contributor

Working on a similar request here #20530

Would love it if you could help contribute this use case!

@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 4, 2022
@peterwoodworth peterwoodworth added the good first issue Related to contributions. See CONTRIBUTING.md label Jun 4, 2022
@shikha372 shikha372 self-assigned this Feb 27, 2024
@shikha372
Copy link
Contributor

shikha372 commented Mar 6, 2024

@pawelzebrowski we could use below approach in CDK to create a route53 alias targeting an interface endpoint in different region :

#Detail of first VPC hosting the endpoint
    const vpc2 = Vpc.fromVpcAttributes( this,
        'vpcregion1-test2',
        {
            vpcId: 'vpcid',
            availabilityZones: ['us-west-1b'],
            region: 'us-west-1',
        }
    ); 

#Assuming this a first VPC with hosted zone that needs to refer to vpc endpoint
const testzone = new HostedZone(this, 'private-zone', {
        vpcs: [vpc1], #VPC not hosting the endpoint
        zoneName: 'TestVpcPeeredZone',
    });

#This will add vpc of another region to hosted zone created above
    testzone.addVpc(vpc2); #another region vpc hosting the endpoint can be added using fromLookup() or fromVpcAttributes() specifying region

        new ARecord(this, `new-record`,{
        zone: testzone, #VPC1 hosted zone 
        recordName: 'some-record',
        target: RecordTarget.fromAlias({
            bind() {
                return {      #VPC2 endpoint details
                    dnsName: 'EndpointDNSName',  
                    hostedZoneId: 'ZoneIDforEndpointDNS',
                };
            },
    }),
});

@khushail khushail added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 2024

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Jun 6, 2024
@pahud pahud added p3 and removed p2 labels Jun 11, 2024
@github-actions github-actions bot added closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-route53 Related to Amazon Route 53 closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p3 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

6 participants