(module name): Errors in the construction Certificate or DnsValidatedCertificate of from stack
See original GitHub issueErrors in the construction Certificate or DnsValidatedCertificate of from stack
Argument of type 'this' is not assignable to parameter of type 'Construct'.
Type 'CertificateStack' is not assignable to type 'Construct'.
Types of property 'node' are incompatible.
Type 'ConstructNode' is missing the following properties from type 'ConstructNode': _locked, _aspects, _children, _context, and 6 more.ts(2345)
this: this
Reproduction Steps
import * as cdk from "@aws-cdk/core";
import { ValidationMethod } from "@aws-cdk/aws-certificatemanager";
import * as cm from "@aws-cdk/aws-certificatemanager";
const domainName = "fast-static-website.miensol.pl";
export class CertificateStack extends cdk.Stack {
constructor(scope: cdk.Construct) {
super(scope, "CertificateStack", {
env: { region: "us-east-1" },
});
const certificate = new cm.Certificate(this, "CustomDomainCertificate", {
domainName: domainName,
validationMethod: ValidationMethod.DNS,
});
const certificateArn = certificate.certificateArn;
new cdk.CfnOutput(this, "CertificateArn", {
value: certificateArn,
});
}
}
What did you expect to happen?
the certificate construct to be created
create a certificate to be used in cloudfront
What actually happened?
the error above . I think its because
import { Construct } from 'constructs';
is used for scope rather than
import {Construct} from "@aws-cdk/core"
Environment
- CDK CLI Version : 1.121.0 (build 026cb8f)
- Framework Version: 1.121.0
- Node.js Version: v14.17.6
- OS : ubuntu:20.04
- Language (Version): TypeScript 4.4.3
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
class DnsValidatedCertificate (construct) · AWS CDK
Fully-qualified domain name to request a certificate for. hostedZone, IHostedZone, Route 53 Hosted Zone used to perform DNS validation of the request.
Read more >Issues creating DnsValidatedCertificate using CDK
I am attempting to create a certificate using the following: this.certificate = new CertificateManager.DnsValidatedCertificate( this ...
Read more >StaticSite - SST docs
Create a certificate with alternate domain names const certificate = new acm.DnsValidatedCertificate(stack, "Certificate", {
Read more >module not found error:no module named numpy even after ...
I keep getting module numpy not found error even though i have followed the steps and installed opencv in my new python environment....
Read more >awslabs/aws-cdk - Gitter
Hey, what is best way to re-use a resource from another stack? I have DevVpcStack which under the hood creates ec2.Vpc, now I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jumic . well that’s embarrassing 😃 . Thanks for spotting. its working after your fix
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.