damp-school-17708
11/10/2021, 3:36 PMimport * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleDomainName = new aws.apigatewayv2.DomainName("exampleDomainName", {
domainName: "<http://http-api.example.com|http-api.example.com>",
domainNameConfiguration: {
certificateArn: aws_acm_certificate.example.arn,
endpointType: "REGIONAL",
securityPolicy: "TLS_1_2",
},
});
const exampleRecord = new aws.route53.Record("exampleRecord", {
name: exampleDomainName.domainName,
type: "A",
zoneId: aws_route53_zone.example.zone_id,
aliases: [{
name: exampleDomainName.domainNameConfiguration.apply(domainNameConfiguration => domainNameConfiguration.targetDomainName),
zoneId: exampleDomainName.domainNameConfiguration.apply(domainNameConfiguration => domainNameConfiguration.hostedZoneId),
evaluateTargetHealth: false,
}],
});
Which I've followed as-is basically.
My route53 record though, seems to point to something different to endpoint I used to call the api with (id-here.execute-api.us-east-1.amazonaws.com works; while this now points to something like different-id-here.execute-api.us-east-1.amazonaws.com) does my api call need to change or am I missing something?
I would expect the route53 to point to the 'working endpoint' nothing elseconst route = new aws.apigatewayv2.Route('apiRoute', {
apiId: apigw.id,
routeKey: '$default',
target: pulumi.interpolate`integrations/${integration.id}`,
})
const stage = new aws.apigatewayv2.Stage(
'apiStage',
{
apiId: apigw.id,
name: env,
routeSettings: [
{
routeKey: route.routeKey,
throttlingBurstLimit: 5000,
throttlingRateLimit: 10000,
},
],
autoDeploy: true,
},
{ dependsOn: [route] },
)