Code Monkey home page Code Monkey logo

aws-prototyping-sdk's Introduction

aws-prototyping-sdk

Introduction

The AWS Prototyping SDK (PDK) aims to accelerate the development of prototypes on AWS. To achieve this, it provides building blocks for common patterns together with development tools to manage and build your projects. The constructs are based on AWS CDK and implement an expanding number of common application/infrastructure patterns, such as the ability to generate complete client and infrastructure code for a REST API from an OpenAPI specification. The project and build tools the PDK provide allows you manage the configuration of multiple related projects in a language-agnostic way, and to efficiently execute parallel incremental builds.

This combination of project management, build execution, and CDK constructs reduce the effort involved in prototyping new ideas on AWS, and allow developers to seamlessly grow these ideas beyond the prototype phase without requiring a complete re-implementation of the original solution. In addition to the foundation of project configuration and build dependency management provided by the nx-monorepo project, PDK also provides a number of other projen projects (some of which implement common infrastructure patterns using CDK) and stand-alone CDK constructs, which are described below. Note: PDK is currently pre-release, targeting version 1.0 for mid-2023.

Core Modules

Modern applications are often implemented across multiple packages or libraries, each potentially implemented in a different language. To help manage the complexity that arises from this, PDK provides a Projen project called 'nx-monorepo' to support dependency management and builds across packages. Together with the project-as-code provided by Projen, this project utilises Nx Build to give developers the ability to manage a collection of different projects within a single repository. Nx Build allows for explicit and implicit dependency management between polyglot projects, and provides shared caching and parallel task execution for super fast builds across multiple languages with ease. By combining Projen and NX Build, 'nx-monorepo' reduces the effort involved in maintaining and building related projects implemented in a mix of languages.

This module provides a high-level CDK construct that is able to deploy your pre-packaged static website content into an S3 Bucket, fronted by Cloudfront. This module uses an Origin Access Identity to ensure your Bucket can only be accessed via Cloudfront and is configured to only allow HTTPS requests by default.

This module provides a projen project that has a default directory structure and resources for an empty React website that utilises the Cloudscape design system. This can be used in tandem with the 'static-website' and 'identity' modules to deploy infrastructure to host and provide identity management to host and secure the website content.

This module provides a projen project that allows you to define an API using either Smithy or OpenAPI v3, and a construct which manages deploying this API in API Gateway, given an integration (eg a lambda) for every operation. It generates type-safe CDK constructs, client, and server code to help you rapidly implement and integrate with your API.

This module provides a projen project that uses a construct based on CDK's CodePipeline construct, named PDKPipeline, to deploy a CI/CD pipeline. It additionally creates a CodeCommit repository and by default is configured to build the project assuming nx-monorepo is being used (although this can be changed). A Sonarqube Scanner can also be configured to trigger a scan whenever the synth build job completes successfully. This Scanner is non-blocking and as such is not instrumented as part of the pipeline.

This module provides a helper utility that automatically configures CDKNag within your application, which validates that the state of constructs within a given scope comply with a given set of rules. Additionally, cdk-nag provides a rule suppression and compliance reporting system. cdk-nag validates constructs by extending AWS CDK Aspects.

This module provides a core framework for supporting additional CDK based automation and tooling, such as diagramming, cost modeling, and security and compliance. Currently, it delivers the following functionality:

  1. Synthesizes a serialized graph (nodes and edges) from CDK source code.
  2. Provides runtime interface for interacting with the graph (in-memory database-like graph store).
  3. Provides plugin framework for additional tooling to utilize and extend the graph.

This module provides a CDK derived construct that can be added to existing CDK project to deploy a configurable Identity Provider with a default Cognito User Pool. It does not depend on projen and can be utilised as an import in an existing CDK application.

Prerequisites

Ensure you have the following packages installed globally:

# from root directory of this package
pnpm i

Quickstart

The README for the 'nx-monorepo' projen project provides an example of how to get started with PDK.

Usage of projen/nx

This package is built using projen and nx as such all tasks should be invoked via either:

  • pnpm nx run-many --target=<task> --all - executes the <task> on every package, in dependency order.
  • pnpm nx run <package_name>:<task> - executes the <task> on the specified <package_name>.

To build the full project, run pnpm nx run-many --target=build --all

Any change to projects/* or .projenrc.ts requires a synth to be executed. To do this, run: pnpm projen from the root directory.

Nx workspace script alias

In addition to the above pnpm nx <command> format to execute commands, the workspace package contains useful alias for common tasks.

Executing pnpm <task> for common tasks will execute pnpm nx run-many --target=<task> --output-style=stream --nx-bail, such as pnpm build will execute pnpx nx run-many --target=build --output-style=stream --nx-bail across all packages.

All nx run-many alias scripts access additional arguments, such as to only run on specific projects you can use pnpm build --projects=proj1,proj2.

See Nx Run-Many options for details.

Documentation

For documentation including examples and a full API reference, visit: https://aws.github.io/aws-prototyping-sdk/

Contributing

See CONTRIBUTING for more information.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

aws-prototyping-sdk's People

Contributors

agdimech avatar cogwirrel avatar jeremyjonas avatar sperka avatar dboyd13 avatar dependabot[bot] avatar jstrunk avatar mteichtahl avatar martenpayne avatar amazon-auto avatar andreacataluccitractable avatar bradenm avatar bhrutledge avatar donatoaz avatar em-xqm avatar joshuatoth avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.