
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
@alma-cdk/domain
Advanced tools
npm i -D @alma-cdk/domain
Simplifies creation of subdomain with a TLS certificate and configuration with services like AWS CloudFront.
This construct is still versioned with v0
major version and breaking changes might be introduced if necessary (without a major version bump), though we aim to keep the API as stable as possible (even within v0
development). We aim to publish v1.0.0
soon and after that breaking changes will be introduced via major version bumps.
import { Domain } from '@alma-cdk/domain';
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
const domain = new Domain(this, 'Domain', {
zone: 'example.com', // retrieve the zone via lookup, or provide IHostedZone
subdomain: 'foobar', // optional subdomain
});
const distribution = new cloudfront.Distribution(this, 'Distribution', {
/* other cloudfront configuration values removed for brevity */
certificate: domain.certificate, // reference to created ICertificate
domainNames: [domain.fqdn], // foobar.example.com
enableIpv6: domain.enableIpv6, // true by default – set enableIpv6 prop to false during new Domain()
})
// assign CloudFront distribution to given fqdn with A + AAAA records
domain.addTarget(new targets.CloudFrontTarget(distribution))
Instead of assigning certificate
, domainNames
and enableIpv6
properties individually, you may choose to use the one-liner helper utility method configureCloudFront()
to set all three values at once – don't forget to use ...
object spread syntax:
const distribution = new cloudfront.Distribution(this, 'Distribution', {
/* other cloudfront configuration values removed for brevity */
// one-liner to configure certificate, domainNames and IPv6 support
...domain.configureCloudFront(),
})
// assign CloudFront distribution to given fqdn with A + AAAA records
domain.addTarget(new targets.CloudFrontTarget(distribution))
Note: The returned domain names configuration is domainNames: [domain.fqdn]
, meaning this only works in scenarios where your CloudFront distribution has only single domain name.
FAQs
Domain with certificate
We found that @alma-cdk/domain 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.