AWS CDK: how to target API Gateway API from Route53

I have an existing domain name registered with AWS Route53 and I have set up a custom domain name in API Gateway. In the console i can configure things such that xxxxxx.zenxxxxxxfoundry.com from...

AWS/CDK: How to create ARecord Target, having CfnEIPAssociation?

For a newly allocated IP, it would be something like this in C# (using .Ref): var arNewPublic = new ARecord(this, $"ARecord_Public_NewAlloc", new ARecordProps { ... Target =...

AWS CDK, creating an alias record for existing cloud front distribution in Route53

I am using AWS CDK ( Python ) to create an Alias record targeted to existing cloud front distribution which has been provisioned in different AWS Account and different Route53 Hosted zone. I am...

AWS CDK Python - Certificate Manager DNS Validation with Route53

I have been trying to set up DNS Certificate Validation using CDK in Python. My code looks like this: ```python class ApiService(core.Construct): def init(self, scope: core.Construct, id: str,...

AWS CDK pipeline with ECS service discovery as well as Route53 Cname records

I am building a pipeline with three stacks in AWS CDK (python), a vpc stack, a database stack, and an application/ecs service and container stack. I need to have be able to create route53 cname...

AWS CDK: how to target an Elastic Beanstalk Environment with a Route53 Alias Record

To create an Elastic Beanstalk Application and Environment I have the following code: ```typescript // this: the class instance extending Construct const application = new CfnApplication(this,...

AWS CDK, creating an alias record for an existing S3 bucket in Route53

I wonder how I could get an existing S3 bucket and create an alias record point to it using AWS CDK? So far so good : ```js const myExistingBucket = Bucket.fromBucketName(this, 'myExistingBucket',...

AWS CDK create Route 53 alias in another AWS account

There are plenty of examples of creating static sites using CDK deployed to the same AWS...

AWS CDK error creating an ARecord for CloudFront distro

Given: export class MyARecord extends cdk.Stack { public readonly arecord: ARecord constructor(scope: cdk.Construct, id: string, props: IcARecordARecordProps) { super(scope, id, props); ...

AWS CDK, creating an alias record for an existing hosted zone in Route53

I am using the AWS CDK (with Python as my deployment language) and I am trying to add an alias record of an existing cloudfront distribution to an existing hosted zone. While I can get cdk synth...

AWS CDK -- Error: Cannot find module '@aws-cdk/cloud-assembly-schema' in Azure DevOps pipeline

Running my AWS CDK on Azure DevOps Pipeline, but getting this Cannot find module '@aws-cdk/cloud-assembly-schema' error. No idea what goes wrong at the moment. Run cdk synth myStack The...

Can you create a route 53 A Record that maps directly to the IP address of a ecs service and ecs task defined using the AWS CDK?

Can you create a route 53 A Record that maps directly to the IP address of a ecs service and ecs task defined using the AWS CDK? I have the following code FargateTaskDefinition taskDef = new...

software.amazon.jsii.JsiiException: Module '@company/cdk-tagsModule' not found

I am trying to use one of our internal generated java library by JSII from Typescript aws-cdk-library project. when we try to invoke and on cdk synth we are getting below...

AWS CDK: how to create Route53 A Record pointing at Elastic IP?

I am creating a CfnUserPoolDomain and am getting an error "Custom domain is not a valid subdomain: Was not able to resolve the root domain, please ensure an A record exists for the root domain." I...

Configuring CloudFront distribution with S3 Origin and Custom Origin (ELB) using AWS CDK

I have an app that uses Django and Vue.js. Currently the API is served on api.mydomain.com that sends traffic to an Application Load Balancer which routes to Fargate services and the Vue.js static...

AWS Route53 how to troubleshoot CDK problems with `Tried to delete resource record set (...) but the values provided do not match the current values`

I have a CDK project which defines a Route53 resource record set that is currently failing to deploy due to the following error: > Tried to delete resource record set [name='some.example.com.',...

CDK DnsValidatedCertificate: Can create a certificate in a linked AWS account, when the hosted zone is part of the parent account?

I'm trying to use AWS' Cloud Development Kit to create an SSL certificate for some sub-subdomains of my website. The trouble is that I'm using AWS Organizations and the relavant resources belong...

AWS: When assuming a role in a child account, how can I keep access to permissions in parent account?

I am setting up a multi-account architecture in AWS. I have my domain hosted in route53 in the root account. When creating infrastructure in the child account with CDK, I need to be able to create...

AWS Load Balancer Controller successfully creates ALB when Ingress is deployed, but unable to get DNS Name in CDK code

I originally posted this question as an issue on the GitHub project for the AWS Load Balancer Controller here: https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2069. I'm...

assumed-role is not authorized to perform: route53:ListHostZonesByDomain; Adding a Route53 Policy to a CodePipeline CodeBuildAction's Assumed Rule

My goal is to create a website at subdomain.mydomain.com pointing to a CloudFront CDN distributing a Lambda running Express that's rendering an S3 website. I'm using AWS CDK to do this. I have an...

AWS CDK: How can I create an alias of a record in the same hosted zone?

I am trying to create an alias in my hosted zone for a non-www to point to a www record. In console, I just create an A record, set it as an alias, and choose Alias to another record in this...

How to Add Route53 alias for CfnDistribution?

Amazon has this example for how to create a custom alias for your CloudFrontWebDistribution: ``` import route53 = require('@aws-cdk/aws-route53'); import targets =...

CloudFront not respecting Behavior Paths -> Origins

I'm using AWS CDK to construct a CloudFront Ingress for various other microservices. It seems super inconsistent in when it works, normally only the first request, then it completely fails. I'm...

Deploying Lambda Function with CDK Failing Due to Missing Parameters

new Function(this, "TestFunction", { handler: "TestFunction.handler", code: Code.asset(path.join(__dirname, "lambdas/")), runtime:...

Unpredictable Cloudfront 502 errors

I have an AWS setup which involves A custom domain name attached too A cloudfront distribution with An API gateway as the origin in front of Some lambda functions that render some nextJS routes...

CDK deploy results in "Bucket named 'x' exists, but not in account 067685711111. Wrong account?

I am modifying a CDK pipeline that works. I am adding a lambda, and when this code modification is made, the pipeline fails with an error. import * as cdk from '@aws-cdk/core'; import * as...

How to provide a custom domain name for a Lambda-based APIGateway in CDK?

For the purposes of this question, assume that I already have an example.org Hosted Zone in Route53 (my actual zone is, of course, different) With the following CDK app: ``` export class...

How can I set up my HostedZone so that it delegates to a parent DNS record in another AWS account?

Introduction I have some TypeScript code that uses CDK to create an API Gateway and a Lambda. It works and deploys to a standard AWS URL. So far so good. I now need to transfer the API Gateway so...

Amazon CDK: Incorrect Construct Type even though it is extended from cdk.Construct?

I am trying to deploy an API Gateway with a custom domain. (no functions, just a common API Gateway that other stacks can then import and use) bin/api-app.ts: ``` import { APIAppStack } from...

Return Data from Lambda backed custom resource CDK

It cannot be this hard, I have a custom resource class and for the life of me cannot figure out how to access the data and move on. ``` from typing_extensions import runtime import os from aws_cdk...