-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
95 changed files
with
1,949 additions
and
1,371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Reporting Security Issues | ||
---------------------------------------------------------------------------------------------------------- | ||
We take all security reports seriously. When we receive such reports, we will investigate and subsequently address any potential vulnerabilities as quickly as possible. If you discover a potential security issue in this project, please notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to [AWS Security](mailto:[email protected]). Please do not create a public GitHub issue in this project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
#!/usr/bin/env node | ||
/********************************************************************************************************************** | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * | ||
* * | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance * | ||
* with the License. A copy of the License is located at * | ||
* * | ||
* http://www.apache.org/licenses/LICENSE-2.0 * | ||
* * | ||
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES * | ||
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions * | ||
* and limitations under the License. * | ||
*********************************************************************************************************************/ | ||
|
||
import * as cdk from 'aws-cdk-lib'; | ||
import { Construct } from 'constructs'; | ||
|
||
/** | ||
* Stack properties for nested stack | ||
*/ | ||
export abstract class BaseNestedStack extends cdk.NestedStack { | ||
/** | ||
* The custom resource lambda arn | ||
*/ | ||
public customResourceLambdaArn: string; | ||
|
||
/** | ||
* The custom resource lambda role arn | ||
*/ | ||
public customResourceLambdaRoleArn: string; | ||
|
||
/** | ||
* Access logging bucket to be associated with any S3 bucket creation | ||
*/ | ||
public readonly accessLoggingBucket: string; | ||
|
||
constructor(scope: Construct, id: string, props?: cdk.NestedStackProps) { | ||
super(scope, id, props); | ||
const stack = cdk.Stack.of(this); | ||
this.customResourceLambdaArn = new cdk.CfnParameter(stack, 'CustomResourceLambdaArn', { | ||
type: 'String', | ||
description: 'The custom resource lambda arn', | ||
allowedPattern: | ||
'^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?$', | ||
constraintDescription: 'Please provide a valid lambda arn.' | ||
}).valueAsString; | ||
|
||
this.customResourceLambdaRoleArn = new cdk.CfnParameter(stack, 'CustomResourceRoleArn', { | ||
type: 'String', | ||
description: 'The custom resource lambda role arn', | ||
allowedPattern: '^arn:(aws|aws-cn|aws-us-gov):iam::\\d{12}:role/[a-zA-Z_0-9+=,.@\\-_/]+$', | ||
constraintDescription: 'Please provide a valid lambda role arn.' | ||
}).valueAsString; | ||
|
||
this.accessLoggingBucket = new cdk.CfnParameter(stack, 'AccessLoggingBucketArn', { | ||
type: 'String', | ||
allowedPattern: '^arn:(aws|aws-cn|aws-us-gov):s3:::\\S+$', | ||
description: 'Arn of the S3 bucket to use for access logging.' | ||
}).valueAsString; | ||
} | ||
} | ||
|
||
export abstract class BaseUseCaseNestedStack extends BaseNestedStack { | ||
/** | ||
* Unique ID for this deployed use case within an application. Provided by the deployment platform if in use. | ||
*/ | ||
public readonly useCaseUUID: string; | ||
|
||
constructor(scope: Construct, id: string, props?: cdk.NestedStackProps) { | ||
super(scope, id, props); | ||
const stack = cdk.Stack.of(this); | ||
|
||
this.useCaseUUID = new cdk.CfnParameter(stack, 'UseCaseUUID', { | ||
type: 'String', | ||
description: | ||
'UUID to identify this deployed use case within an application. Please provide an 8 character long UUID. If you are editing the stack, do not modify the value (retain the value used during creating the stack). A different UUID when editing the stack will result in new AWS resource created and deleting the old ones', | ||
allowedPattern: '^[0-9a-fA-F]{8}$', | ||
maxLength: 8, | ||
constraintDescription: 'Please provide an 8 character long UUID' | ||
}).valueAsString; | ||
} | ||
} |
Oops, something went wrong.