Skip to content

Commit

Permalink
v0.8.0-beta
Browse files Browse the repository at this point in the history
Initial library baseline.
  • Loading branch information
shsenior committed Mar 26, 2020
1 parent a0debab commit 5636629
Show file tree
Hide file tree
Showing 439 changed files with 59,287 additions and 13 deletions.
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.0-beta] - 2020-03-31
### Added
- Initial public beta release
- aws-apigateway-dynamodb module added
- aws-apigateway-lambda module added
- aws-apigateway-sqs module added
- aws-cloudfront-apigateway-lambda module added
- aws-cloudfront-apigateway module added
- aws-cloudfront-s3 module added
- aws-cognito-apigateway-lambda module added
- aws-dynamodb-stream-lambda-elasticsearch-kibana module added
- aws-dynamodb-stream-lambda module added
- aws-events-rule-lambda module added
- aws-iot-kinesisfirehose-s3 module added
- aws-iot-lambda-dynamodb module added
- aws-iot-lambda module added
- aws-kinesisfirehose-s3-and-kinesisanalytics module added
- aws-kinesisfirehose-s3 module added
- aws-kinesisstreams-lambda module added
- aws-lambda-dynamodb module added
- aws-lambda-elasticsearch-kibana module added
- aws-lambda-s3 module added
- aws-lambda-sns module added
- aws-s3-lambda module added
- aws-sns-lambda module added
- aws-sqs-lambda module added
- core module added
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ information to effectively respond to your bug report or contribution.

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
When filing an issue, please check [existing open](https://github.com/awslabs/aws-solutions-konstruk/issues), or [recently closed](https://github.com/awslabs/aws-solutions-konstruk/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
Expand Down Expand Up @@ -41,7 +41,7 @@ GitHub provides additional document on [forking a repository](https://help.githu


## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/aws-solutions-konstruk/labels/help%20wanted) issues is a great place to start.


## Code of Conduct
Expand All @@ -56,6 +56,6 @@ If you discover a potential security issue in this project we ask that you notif

## Licensing

See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
See the [LICENSE](https://github.com/awslabs/aws-solutions-konstruk/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
48 changes: 47 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1,47 @@
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
AWS Konstruk
Copyright 2019 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/
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.

**********************
THIRD PARTY COMPONENTS
**********************
This software includes third party software subject to the following copyrights:

@types/jest under the Massachusetts Institute of Technology (MIT) license
@types/node under the Massachusetts Institute of Technology (MIT) license
@typescript-eslint/eslint-plugin under the Massachusetts Institute of Technology (MIT) license
@typescript-eslint/parser under the BSD-2-Clause license
aws-cdk under the Apache License Version 2.0
aws-sdk under the Apache License Version 2.0
aws-sdk-mock under the Apache License Version 2.0
bootstrap under the Massachusetts Institute of Technology (MIT) license
chai under the Massachusetts Institute of Technology (MIT) license
color under the Massachusetts Institute of Technology (MIT) license
color-name under the Massachusetts Institute of Technology (MIT) license
deepmerge under the MIT License
eslint under the Massachusetts Institute of Technology (MIT) license
eslint-import-resolver-node under the Massachusetts Institute of Technology (MIT) license
eslint-import-resolver-typescript under the ISC license
eslint-plugin-import under the Massachusetts Institute of Technology (MIT) license
eslint-plugin-license-header under the Massachusetts Institute of Technology (MIT) license
fs-extra under the Massachusetts Institute of Technology (MIT) license
jest under the Massachusetts Institute of Technology (MIT) license
jsii under the Apache License Version 2.0
jsii-pacmak under the Apache License Version 2.0
lerna under the Massachusetts Institute of Technology (MIT) license
minimist under the Massachusetts Institute of Technology (MIT) license
mocha under the Massachusetts Institute of Technology (MIT) license
moment under the Massachusetts Institute of Technology (MIT) license
npm-run-all under the Massachusetts Institute of Technology (MIT) license
nyc under the ISC license
sharp under the Apache License Version 2.0
sinon under the BSD-3-Clause license
sinon-chai under the BSD-2-Clause license
source-map-support under the Massachusetts Institute of Technology (MIT) license
tslint under the Apache License Version 2.0
typescript under the Apache License Version 2.0
uuid under the Massachusetts Institute of Technology (MIT) license
61 changes: 54 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,60 @@
## My Project
# API Reference
<!--BEGIN STABILITY BANNER-->

TODO: Fill this README out!
---

Be sure to:
![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)

* Change the title in this README
* Edit your repository description on GitHub
> **This is a _developer preview_ (public beta) library.**
>
> All modules are under active development and subject to non-backward compatible changes or removal in any
> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
## License
---
<!--END STABILITY BANNER-->

This project is licensed under the Apache-2.0 License.
| **API Reference**:| <span style="font-weight: normal">http://docs.awssolutionsbuilder.com/aws-solutions-konstruk/latest/</span>|
|:-------------|:-------------|
<div style="height:8px"></div>

The AWS Solutions Konstruk Library (Konstruk) is an open-source extension of the AWS Cloud Development Kit (AWS CDK) that provides multi-service, well-architected patterns for quickly defining solutions in code to create predictable and repeatable infrastructure. Konstruk's goal is to accelerates the experience for developers to build solutions of any size using pattern-based definitions for their architecture.

The patterns defined in Konstruk are high level, multi-service abstractions of AWS CDK constructs that have default configurations based on well-architected best practices. The library is organized into logical modules using object-oriented techniques to create each architectural pattern model.

The CDK is available in the following languages:

* JavaScript, TypeScript (Node.js ≥ 10.3.0)
* Python (Python ≥ 3.6)

## Modules

The Konstruk library is organized into several modules. They are named like this:

* __aws-xxx__: well architected pattern package for the indicated services. This package will contain constructs that contain multiple AWS CDK service modules to configure the given pattern.
* __xxx__: packages that don't start "aws-" are Konstruk core modules that are used to configure best practice defaults for services used within the pattern library.

## Module Contents

Modules contain the following types:

* __Patterns__ - All higher-level, multi-services constructs in this library.
* __Other Types__ - All non-construct classes, interfaces, structs and enums that exist to support the patterns.

Patterns take a set of (input) properties in their constructor; the set of properties (and which ones are required) can be seen on a pattern's documentation page.

The pattern's documentation page also lists the available methods to call and the properties which can be used to retrieve information about the pattern after it has been instantiated.

## Sample Use Cases

This library includes a collection of functional use case implementations to demonstrate the usage of Konstruk architectural patterns. These can be used in the same way as architectural patterns, and can be conceptualized as an additional "higher-level" abstraction of those patterns. The following use cases are provided as functional examples:

* __aws-s3-static-website__ - implements an Amazon CloudFront distribution, Amazon S3 bucket and AWS Lambda-based custom resource to copy the static website content for the Wild Rydes demo website (part of the aws-serverless-web-app implementation).
* Use case pattern: https://github.com/awslabs/aws-solutions-konstruk/source/use_cases/aws-s3-static-website
* __aws-serverless-image-handler__ - implements an Amazon CloudFront distribution, an Amazon API Gateway REST API, an AWS Lambda function, and necessary permissions/logic to provision a functional image handler API for serving image content from one or more Amazon S3 buckets within the deployment account.
* Use case pattern: https://github.com/awslabs/aws-solutions-konstruk/source/use_cases/aws-serverless-image-handler
* __aws-serverless-web-app__ - implements a simple serverless web application that enables users to request unicorn rides from the Wild Rydes fleet. The application will present users with an HTML based user interface for indicating the location where they would like to be picked up and will interface on the backend with a RESTful web service to submit the request and dispatch a nearby unicorn. The application will also provide facilities for users to register with the service and log in before requesting rides.
* Use case pattern: https://github.com/awslabs/aws-solutions-konstruk/source/use_cases/aws-serverless-web-app

***
&copy; Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
11 changes: 11 additions & 0 deletions source/lerna.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"lerna": "3.15.0",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
"./patterns/@aws-solutions-konstruk/*",
"./use_cases/*"
],
"rejectCycles": "true",
"version": "0.8.0"
}
44 changes: 44 additions & 0 deletions source/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "aws-solutions-konstruk",
"version": "0.8.0",
"description": "AWS Solutions Konstruk Library",
"repository": {
"type": "git",
"url": "https://github.com/awslabs/aws-solutions-konstruk.git",
"directory": "source"
},
"license": "Apache-2.0",
"author": {
"name": "Amazon Web Services",
"url": "https://aws.amazon.com"
},
"private": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "^2.14.0",
"@typescript-eslint/parser": "^2.14.0",
"eslint": "^6.8.0",
"eslint-import-resolver-node": "^0.3.2",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-license-header": "^0.2.0",
"fs-extra": "^8.1.0",
"jest": "^24.9.0",
"jsii": "~0.22.0",
"jsii-pacmak": "~0.22.0",
"tslint": "^5.20.1",
"typescript": "~3.8.2"
},
"devDependencies": {
"lerna": "^3.18.4"
},
"workspaces": {
"packages": [
"./patterns/@aws-solutions-konstruk/*",
"./use_cases/*"
],
"nohoist": [
"**/deepmerge",
"**/deepmerge/**"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
lib/*.js
test/*.js
*.d.ts
coverage
test/lambda/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
lib/*.js
test/*.js
!test/lambda/*
*.js.map
*.d.ts
node_modules
*.generated.ts
dist
.jsii

.LAST_BUILD
.nyc_output
coverage
.nycrc
.LAST_PACKAGE
*.snk
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Exclude typescript source and config
*.ts
tsconfig.json
coverage
.nyc_output
*.tgz
*.snk
*.tsbuildinfo

# Include javascript files and typescript declarations
!*.js
!*.d.ts

# Exclude jsii outdir
dist

# Include .jsii
!.jsii

# Include .jsii
!.jsii
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# aws-apigateway-dynamodb module
<!--BEGIN STABILITY BANNER-->

---

![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)

> **This is a _developer preview_ (public beta) module.**
>
> All classes are under active development and subject to non-backward compatible changes or removal in any
> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
---
<!--END STABILITY BANNER-->

| **API Reference**:| <span style="font-weight: normal">http://docs.awssolutionsbuilder.com/aws-solutions-konstruk/latest/api/aws-apigateway-dynamodb/</span>|
|:-------------|:-------------|
<div style="height:8px"></div>


| **Language** | **Package** |
|:-------------|-----------------|
|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png){: style="height:16px;width:16px"} Python|`aws_solutions_konstruk.aws_apigateway_dynamodb`|
|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png){: style="height:16px;width:16px"} Typescript|`@aws-solutions-konstruk/aws-apigateway-dynamodb`|

## Overview
This AWS Solutions Konstruk implements an Amazon API Gateway REST API connected to Amazon DynamoDB table.

Here is a minimal deployable pattern definition:

``` javascript
import { ApiGatewayToDynamoDBProps, ApiGatewayToDynamoDB } from "@aws-solutions-konstruk/aws-apigateway-dynamodb";

const props: ApiGatewayToDynamoDBProps = {};

new ApiGatewayToDynamoDB(stack, 'test-api-gateway-dynamodb-default', props);

```

## Initializer

``` text
new ApiGatewayToDynamoDB(scope: Construct, id: string, props: ApiGatewayToDynamoDBProps);
```

_Parameters_

* scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)
* id `string`
* props [`ApiGatewayToDynamoDBProps`](#pattern-construct-props)

## Pattern Construct Props

| **Name** | **Type** | **Description** |
|:-------------|:----------------|-----------------|
|dynamoTableProps|[`dynamodb.TableProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-dynamodb.TableProps.html)|Optional user provided props to override the default props for DynamoDB Table|
|apiGatewayProps?|[`api.RestApiProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.RestApiProps.html)|Optional user-provided props to override the default props for the API Gateway.|
|allowCreateOperation|`boolean`|Whether to deploy API Gateway Method for Create operation on Dynamodb DB table.|
|createRequestTemplate|`string`|API Gateway Request template for Create method, required if allowCreateOperation set to true|
|allowReadOperation|`boolean`|Whether to deploy API Gateway Method for Read operation on Dynamodb DB table.|
|allowUpdateOperation|`boolean`|Whether to deploy API Gateway Method for Update operation on Dynamodb DB table.|
|updateRequestTemplate|`string`|API Gateway Request template for Update method, required if allowUpdateOperation set to true|
|allowDeleteOperation|`boolean`|Whether to deploy API Gateway Method for Delete operation on Dynamodb DB table.|

## Pattern Properties

| **Name** | **Type** | **Description** |
|:-------------|:----------------|-----------------|
|restApi()|[`api.RestApi`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.RestApi.html)|Returns an instance of the api.RestApi created by the construct.|
|dynamoTable()|[`dynamodb.Table`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-dynamodb.Table.html)|Retruns an instance of dynamodb.Table created by the construct.|

## Architecture
![Architecture Diagram](architecture.png)

***
&copy; Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5636629

Please sign in to comment.