Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(scope) {
super(scope, 'scale-your-cloudformation');
const domainName = 'scaleyourcloudformation.com';
const cert = new Certificate(this, 'cert', {
domainName,
validationMethod: ValidationMethod.DNS,
});
const websiteBucket = new Bucket(this, 'WebsiteBucket', {
domainName,
removalPolicy: RemovalPolicy.DESTROY,
websiteIndexDocument: 'index.html',
websiteErrorDocument: 'error.html',
});
const originId = new CfnCloudFrontOriginAccessIdentity(
this,
'OriginAccessIdentity',
{
cloudFrontOriginAccessIdentityConfig: {
comment: `CloudFront OriginAccessIdentity for ${websiteBucket.bucketName}`,
},