You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export class ClientStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
new KinesisStreamsToKinesisFirehoseToS3(this, 'stream', {});
const logBucket = new s3.Bucket(this, 'separate-bucket', {});
/**
* Throws Error('Duration.toString() was used, but .toSeconds, .toMinutes
* or .toDays should have been called instead');
*/
new CloudFrontToS3(this, 'CloudFrontToS3', {
// bucketProps: {
// serverAccessLogsBucket: logBucket,
// serverAccessLogsPrefix: 'ui-s3/'
// },
cloudFrontDistributionProps: {
// enableLogging: true,
errorResponses: [
{ httpStatus: 403, responseHttpStatus: 200, responsePagePath: '/index.html' },
{ httpStatus: 404, responseHttpStatus: 200, responsePagePath: '/index.html' }
],
logBucket: logBucket,
logFilePrefix: 'ui-cf/'
},
insertHttpSecurityHeaders: false
});
}
}
Throws this error:
public toJSON(): any {
^
Error: Argument to Intrinsic must be a plain value object, got () => {
throw new Error('Duration.toString() was used, but .toSeconds, .toMinutes or .toDays should have been called instead');
}
at new Intrinsic (/Users/biffgaut/Documents/Active/AWS/Constructs/beomseok/client/node_modules/@aws-cdk/core/lib/private/intrinsic.ts:37:13)
at Function.asAny (/Users/biffgaut/Documents/Active/AWS/Constructs/beomseok/client/node_modules/@aws-cdk/core/lib/token.ts:102:48)
at Function.asString (/Users/biffgaut/Documents/Active/AWS/Constructs/beomseok/client/node_modules/@aws-cdk/core/lib/token.ts:79:53)
at Duration.toString (/Users/biffgaut/Documents/Active/AWS/Constructs/beomseok/client/node_modules/@aws-cdk/core/lib/duration.ts:219:18)
at realTypeOf (/Users/biffgaut/Documents/Active/AWS/Constructs/beomseok/client/node_modules/@aws-solutions-constructs/core/node_modules/deep-diff/index.js:117:81)
at deepDiff (/Users/biffgaut/Documents/Active/AWS/Constructs/beomseok/client/node_modules/@aws-solutions-constructs/core/node_modules/deep-diff/index.js:193:9)
at deepDiff (/Users/biffgaut/Documents/Active/AWS/Constructs/beomseok/client/node_modules/@aws-solutions-constructs/core/node_modules/deep-diff/index.js:255:15)
at deepDiff (/Users/biffgaut/Documents/Active/AWS/Constructs/beomseok/client/node_modules/@aws-solutions-constructs/core/node_modules/deep-diff/index.js:255:15)
Reproduction Steps
Error Log
Environment
CDK CLI Version : 1.06.1
CDK Framework Version: 1.106.1
AWS Solutions Constructs Version : 1.106.1
OS : iOS
Language : Typescript
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered:
This code:
Throws this error:
Reproduction Steps
Error Log
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: