![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
cdk-cross-account-route53
Advanced tools
CDK Construct to allow creation of Route 53 records in a different account
AWS CDK Constructs that define:
These constructs allow you to create Route53 records where the zone exists in a separate AWS account to the Cloudformation Stack.
yarn add cdk-cross-account-route53
First create the role in the stack for the AWS account which contains the hosted zone.
// DNS Stack
const zone = new route53.PublicHostedZone(this, 'HostedZone', {
zoneName: 'example.com',
});
new CrossAccountRoute53Role(this, 'WebRoute53Role', {
roleName: 'WebRoute53Role',
assumedBy: new iam.AccountPrincipal('22222222'), // Web Stack Account
zone,
records: [{ domainNames: 'www.example.com' }],
});
Then in the child stack create the records
const hostedZoneId = 'Z12345'; // ID of the zone in the other account
const distribution = new cloudfront.Distribution(this, 'Distribution', {
domainNames: ['example.com'],
});
new CrossAccountRoute53RecordSet(this, 'ARecord', {
delegationRoleName: 'WebRoute53Role',
delegationRoleAccount: '111111111', // The account that contains the zone and role
hostedZoneId,
resourceRecordSets: [{
Name: `example.com`,
Type: 'A',
AliasTarget: {
DNSName: distribution.distributionDomainName,
HostedZoneId: 'Z2FDTNDATAQYW2', // Cloudfront Hosted Zone Id
EvaluateTargetHealth: false,
},
}],
});
If you want to use wildcard matching on domains you can choose to not autonormalise the domains and pass in a wildcard e.g.
new CrossAccountRoute53Role(this, 'WebRoute53Role', {
roleName: 'WebRoute53Role',
assumedBy: new iam.AccountPrincipal('22222222'), // Web Stack Account
zone,
records: [{ domainNames: '*.example.com' }],
normaliseDomains: false,
});
new CrossAccountRoute53Role(scope: Construct, id: string, props: CrossAccountRoute53RoleProps)
Parameters
Name | Type | Description |
---|---|---|
roleName | string | The role name |
assumedBy | iam.IPrincipal | The principals that are allowed to assume the role |
zone | route53.IHostedZone | The hosted zone. |
records | CrossAccountRoute53RolePropsRecord[] | The records that can be created by this role |
normaliseDomains | boolean | Normalise the domains names as per AWS documentation (default: true) |
Name | Type | Description |
---|---|---|
domainNames | string | string[] | The names of the records that can be created or changed |
types | route53.RecordType[] | The typepsof records that can be created. Default ['A', 'AAAA'] |
actions | 'CREATE' | 'UPSERT' | 'DELETE' | The allowed actions. Default ['CREATE', 'UPSERT', 'DELETE'] |
new CrossAccountRoute53RecordSet(scope: Construct, id: string, props: CrossAccountRoute53RecordSetProps)
Parameters
Name | Type | Description |
---|---|---|
delegationRoleName | string | The role name created in the account with the hosted zone |
delegationRoleAccount | string | The account identfier of the account with the hosted zone |
hostedZoneId | string | The hosted zoned id |
resourceRecordSets | Route53.ResourceRecordSets | The changes to be applied. These are in the same format as taken by ChangeResourceRecordSets Action |
These constructs will stay in v0.x.x
for a while, to allow easier bug fixing & breaking changes if absolutely needed.
Once bugs are fixed (if any), the constructs will be published with v1
major version and will be marked as stable.
Only typescript has been tested.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsFAQs
CDK Construct to allow creation of Route 53 records in a different account
We found that cdk-cross-account-route53 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.