Skip to content

Commit

Permalink
Merge branch 'main' into aws-iot-s3
Browse files Browse the repository at this point in the history
  • Loading branch information
surukonda authored Oct 29, 2021
2 parents e1ee7ec + c876cdc commit f77ae3f
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 4 deletions.
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ documentation, we greatly value feedback and contributions from our community.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
information to effectively respond to your bug report or contribution.


## Reporting Bugs/Feature Requests

We welcome you to use the GitHub issue tracker to report bugs or suggest features.
Expand Down
46 changes: 43 additions & 3 deletions DESIGN_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,44 @@ Existing Inconsistencies would not be published, that’s for our internal use
| apiGatewayLogGroup | logs.LogGroup ||
| apiGatewayRole | iam.Role ||

## Application Load Balancer
**Required Attributes on Props**

| Name | Type | Notes |
| --- | --- | --- |
| loadBalancerProps?| elasticloadbalancingv2.ApplicationLoadBalancerProps | Optional custom properties for a new loadBalancer. Providing both this and existingLoadBalancer is an error. This cannot specify a VPC, it will use the VPC in existingVpc or the VPC created by the construct. |
| existingLoadBalancerObj? | elasticloadbalancingv2.ApplicationLoadBalancer | Existing Application Load Balancer to incorporate into the construct architecture. Providing both this and loadBalancerProps is an error. The VPC containing this loadBalancer must match the VPC provided in existingVpc. |
| listenerProps? | ApplicationListenerProps | Props to define the listener. Must be provided when adding the listener to an ALB (eg - when creating the alb), may not be provided when adding a second target to an already established listener. When provided, must include either a certificate or protocol: HTTP |
| targetProps? | ApplicationTargetGroupProps | Optional custom properties for a new target group. While this is a standard attribute of props for ALB constructs, there are few pertinent properties for a Lambda target. |
| ruleProps? | AddRuleProps | Rules for directing traffic to the target being created. May not be specified for the first listener added to an ALB, and must be specified for the second target added to a listener. Add a second target by instantiating this construct a second time and providing the existingAlb from the first instantiation. |
| logAlbAccessLogs? | boolean | Whether to turn on Access Logs for the Application Load Balancer. Uses an S3 bucket with associated storage costs.Enabling Access Logging is a best practice. default - true |
| albLoggingBucketProps? | s3.BucketProps | Optional properties to customize the bucket used to store the ALB Access Logs. Supplying this and setting logAccessLogs to false is an error. @default - none |
| publicApi | boolean | Whether the construct is deploying a private or public API. This has implications for the VPC and ALB. |

**Required Construct Properties**

| Name | Type | Notes |
| --- | --- | --- |
| loadBalancer | ec2.IVpc | The VPC used by the construct (whether created by the construct or providedb by the client) |
| Listener? | elb.ApplicationListener | The listener used by this pattern, if the pattern requires a listener (eg - this is not set by aws-route53-alb). |

## CloudFront
**Required Attributes on Props**

| Name | Type | Notes |
| --- | --- | --- |
| cloudFrontDistributionProps? | cloudfront.CloudFront.WebDistributionProps ||
| insertHttpSecurityHeaders? | boolean ||
| insertHttpSecurityHeaders?|`boolean`|Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront|
| 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.|

**Required Construct Properties**

| Name | Type | Notes |
| --- | --- | --- |
| cloudFrontLoggingBucket? s3.Bucket ||
| cloudFrontWebDistribution cloudfront.CloudrontWebDistribution ||
| cloudFrontFunction?|[`cloudfront.Function`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-cloudfront.Function.html)|Returns an instance of the Cloudfront function created by the pattern.|

## DynamoDB
**Required Attributes on Props**
Expand Down Expand Up @@ -161,7 +185,6 @@ Existing Inconsistencies would not be published, that’s for our internal use
| eventsRule | events.Rule ||
| eventBus? | events.IEventBus | Only populated for non-default Event Buses.|


## Firehose
**Required Attributes on Props**

Expand Down Expand Up @@ -222,22 +245,39 @@ Existing Inconsistencies would not be published, that’s for our internal use
| --- | --- | --- |
| lambdaFunction | lambda.Function ||

## Route53
**Required Attributes on Props**

| Name | Type | Notes |
| --- | --- | --- |
| privateHostedZoneProps? | [route53.PrivateHostedZoneProps](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-route53.PrivateHostedZoneProps.html) | Optional custom properties for a new Private Hosted Zone. Cannot be specified for a public API. Cannot specify a VPC, it will use the VPC in existingVpc or the VPC created by the construct. Providing both this and existingHostedZoneInterfaceis an error. |
| existingHostedZoneInterface? | [route53.IHostedZone](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-route53.IHostedZone.html) | Existing Public or Private Hosted Zone (type must match publicApi setting). Specifying both this and privateHostedZoneProps is an error. If this is a Private Hosted Zone, the associated VPC must be provided as the existingVpc property |
| publicApi | boolean | Whether the construct is deploying a private or public API. This has implications for the Hosted Zone, VPC and ALB. |

**Required Construct Properties**

| Name | Type | Notes |
| --- | --- | --- |
| hostedZone | [route53.IHostedZone](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-route53.IHostedZone.html) | The hosted zone used by the construct (whether created by the construct or providedb by the client) |

## S3
**Required Attributes on Props**

| Name | Type | Notes |
| --- | --- | --- |
| existingBucketObj? | s3.Bucket | Either this or bucketProps must be provided |
| bucketProps? | s3.BucketProps | |
| loggingBucketProps? | s3.BucketProps | Creating an S3 Bucket will generate a Logging Bucket which users can provide props to override the default props |
| s3EventTypes? | s3.EventType | Only required when construct responds to S3 events |
| s3EventFilters? | s3.NotificationKeyFilter |Only required when construct responds to S3 events |
|loggingBucketProps?|[`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 S3 Logging Bucket.|
| logS3AccessLogs? | boolean| Whether to turn on Access Logs for the S3 bucket with the associated storage costs. Enabling Access Logging is a best practice.|

**Required Construct Properties**

| Name | Type | Notes |
| --- | --- | --- |
| s3Bucket | s3.Bucket ||
| s3Bucket? | s3.Bucket | If the construct created a new bucket. If an existing bucket interface was submitted, this is undefined. |
| s3BucketInterface |[`s3.IBucket`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.IBucket.html)|Returns an instance of s3.IBucket created by the construct|
| s3LoggingBucket | s3.Bucket ||

## SNS
Expand Down
26 changes: 26 additions & 0 deletions deployment/allow-partial-builds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

result=${PWD##*/} # to assign to a variable

(return 0 2>/dev/null) && sourced=1 || sourced=0

if [ $sourced -ne 1 ]
then
echo
echo
echo 'Error - You must run this script with the source directive:'
echo
echo ' source ./deployment/allow-partial-builds.sh'
echo
elif [ $result != 'aws-solutions-constructs' ]
then
echo
echo
echo 'Error - You must run this script from the aws-solutions-constructs folder.'
echo
else
./deployment/align-version.sh
cd source
export PATH=$(npm bin):$PATH
cd patterns/@aws-solutions-constructs
fi

0 comments on commit f77ae3f

Please sign in to comment.