Coder Social home page Coder Social logo

pitfunie / aws-zerotrust-service2service-workshop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/aws-zerotrust-service2service-workshop

0.0 1.0 0.0 241 KB

Code for the environment build in the Zero Trust service2service workshop.

Home Page: https://zerotrust-service2service.workshop.aws/

License: MIT No Attribution

Python 97.22% Batchfile 0.97% Shell 1.82%

aws-zerotrust-service2service-workshop's Introduction

Zero Trust Workshop - Service2Service Episode - Code

This repository contains the source code, AWS environment build, of the Zero Trust Service2Service Workshop workshop. It does not contain the source code of the workshop's website.

There are two main CDK stacks in this code:

  • ServiceA
  • ServiceB

High Level Architecture:

How To Use

Requirements

  • python3
  • node
  • aws-cdk

Steps

  1. Clone this repo & cd aws-zerotrust-service2service-workshop

  2. Create and activate virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate
  3. Once the virtual environment is activated, install the required dependencies:

    pip install -r requirements.txt
  4. You should now be able to run CDK commands. Start by listing available stacks:

    cdk ls
  5. For example, if you want to synthesize the CloudFormation template for a stack:

    cdk synth <StackName>

Specific to this app

# While in the root directory of this repo:
pip3 install aws_requests_auth -t src/lambda/layer/python

Why? I create a Lambda layer that contains the aws_requests_auth package used by Lambda functions. I avoid pushing the package's files to the repo (.gitignore). So you need to pip install the package after cloning this repo. Then at cdk deploy time CDK uses packages installed in ./src/lambda/layer/python to create the Lambda Layer.

Useful commands

  • cdk ls list all stacks in the app
  • cdk synth emits the synthesized CloudFormation template
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk docs open CDK documentation

Repo structure

This project is initialized by cdk init and has the standard structure of a Python project.

.
├── cfn_templates                           <-- Directory for synthesized CFN templates
├── src                                     <-- Directory for Lambda and EC2 source codes
├── zerotrust_service2service_workshop      <-- Directory for main CDK stacks
├── app.py                                  <-- The entry point for this application.
├── config.yml                              <-- [Not a CDK thing] Static variables used in this app.
├── README.md                               <-- This instructions file
├── setup.py                                <-- Defines package's construction and dependencies.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

aws-zerotrust-service2service-workshop's People

Contributors

amazon-auto avatar angabini avatar

Watchers

 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.