Skip to content

Commit

Permalink
feat(aws-cloudfront-apigateway-lambda): added cloudFrontLoggingBucket…
Browse files Browse the repository at this point in the history
…Props to cloudfront-apigateway-lambda (#455)

* Added cloudFrontLoggingBucketProps to cloudfront-apigateway-lambda

* removed autoDeleteObjects for cfn nag scans
  • Loading branch information
mickychetta committed Oct 13, 2021
1 parent 05fe1e9 commit 5e42612
Show file tree
Hide file tree
Showing 5 changed files with 984 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ _Parameters_
| **Name** | **Type** | **Description** |
|:-------------|:----------------|-----------------|
|existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-lambda.FunctionProps.html)|Optional user provided props to override the default props for the Lambda function.|
|apiGatewayProps?|[`api.LambdaRestApiProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.LambdaRestApiProps.html)|Optional user provided props to override the default props for API Gateway|
|cloudFrontDistributionProps?|[`cloudfront.DistributionProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudfront.DistributionProps.html)|Optional user provided props to override the default props for CloudFront Distribution|
|insertHttpSecurityHeaders?|`boolean`|Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront|
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-logs.LogGroupProps.html)|Optional user provided props to override the default props for for the CloudWatchLogs LogGroup.|
|cloudFrontLoggingBucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|Optional user provided props to override the default props for the CloudFront Logging Bucket.|

## Pattern Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface CloudFrontToApiGatewayToLambdaProps {
*/
readonly existingLambdaObj?: lambda.Function,
/**
* User provided props to override the default props for the Lambda function.
* Optional user provided props to override the default props for the Lambda function.
*
* @default - Default props are used
*/
Expand All @@ -58,11 +58,17 @@ export interface CloudFrontToApiGatewayToLambdaProps {
*/
readonly insertHttpSecurityHeaders?: boolean,
/**
* User provided props to override the default props for the CloudWatchLogs LogGroup.
* Optional user provided props to override the default props for the CloudWatchLogs LogGroup.
*
* @default - Default props are used
*/
readonly logGroupProps?: logs.LogGroupProps
/**
* Optional user provided props to override the default props for the CloudFront Logging Bucket.
*
* @default - Default props are used
*/
readonly cloudFrontLoggingBucketProps?: s3.BucketProps
}

export class CloudFrontToApiGatewayToLambda extends Construct {
Expand Down Expand Up @@ -113,7 +119,8 @@ export class CloudFrontToApiGatewayToLambda extends Construct {
const apiCloudfront: CloudFrontToApiGateway = new CloudFrontToApiGateway(this, 'CloudFrontToApiGateway', {
existingApiGatewayObj: this.apiGateway,
cloudFrontDistributionProps: props.cloudFrontDistributionProps,
insertHttpSecurityHeaders: props.insertHttpSecurityHeaders
insertHttpSecurityHeaders: props.insertHttpSecurityHeaders,
cloudFrontLoggingBucketProps: props.cloudFrontLoggingBucketProps
});

this.cloudFrontWebDistribution = apiCloudfront.cloudFrontWebDistribution;
Expand Down
Loading

0 comments on commit 5e42612

Please sign in to comment.