Skip to content

Instantly share code, notes, and snippets.

Avatar

Paul Duvall PaulDuvall

  • us-east-1
View GitHub Profile
View stelligent-blog-swa-launch-stack.sh
git clone https://github.com/PaulDuvall/cloudproviders.git
cd cloudproviders
sudo chmod +x launch-stack.sh
./launch-stack.sh
View stelligent-blog-diagrams-secrets.sh
aws secretsmanager create-secret --name github/personal-access-token --description "GitHub Token" --secret-string "GITHUBTOKEN"
View stelligent-blog-diagrams-pipeline.yml
Pipeline:
Type: AWS::CodePipeline::Pipeline
Properties:
RoleArn: !GetAtt CodePipelineRole.Arn
Stages:
- Name: Source
Actions:
- InputArtifacts: []
Name: Source
ActionTypeId:
View stelligent-blog-diagrams-buildspec.yml
version: 0.2
phases:
install:
runtime-versions:
python: 3.7
commands:
- python --version
- 'curl -O https://bootstrap.pypa.io/get-pip.py'
- python3 get-pip.py --user
- pip install --upgrade pip
View stelligent-blog-diagrams-codebuild.yml
CodeBuildCommands:
Type: AWS::CodeBuild::Project
DependsOn: CodeBuildRole
Properties:
Name:
Ref: AWS::StackName
Description: Build application
ServiceRole:
Fn::GetAtt:
- CodeBuildRole
View serverless-web-apps.py
# https://diagrams.mingrammer.com/docs/nodes/aws
from diagrams import Cluster, Diagram
from diagrams.aws.compute import Lambda
from diagrams.aws.storage import S3
from diagrams.aws.network import APIGateway
from diagrams.aws.database import DynamodbTable
from diagrams.aws.security import IdentityAndAccessManagementIam
from diagrams.aws.devtools import Codebuild
from diagrams.aws.devtools import Codecommit
from diagrams.aws.devtools import Codedeploy
@PaulDuvall
PaulDuvall / diagrams-as-code.sh
Last active Jun 15, 2020
stelligent-blog-diagrams-as-code
View diagrams-as-code.sh
git clone https://github.com/PaulDuvall/diagrams-as-code.git
cd diagrams-as-code
sudo chmod +x *.sh
./launch-stack.sh
@PaulDuvall
PaulDuvall / stelligent-blog-pipeline-serverless-app.yml
Last active Jun 26, 2020
CodePipeline definition for Serverless application
View stelligent-blog-pipeline-serverless-app.yml
Pipeline:
Type: AWS::CodePipeline::Pipeline
Properties:
RoleArn: !GetAtt CodePipelineRole.Arn
Stages:
- Name: Source
...
ActionTypeId:
Category: Source
Owner: ThirdParty
@PaulDuvall
PaulDuvall / stelligent-blog-serverless-function-index-get.yml
Last active Jun 11, 2020
Use the AWS SAM to define a Serverless Function
View stelligent-blog-serverless-function-index-get.yml
Type: 'AWS::Serverless::Function'
Properties:
Handler: index-get.handler
CodeUri: src/
Runtime: nodejs12.x
AutoPublishAlias: live
DeploymentPreference: ...
MemorySize: 128
Policies:
- DynamoDBReadPolicy:
View stelligent-blog-buildspec-api-tests.yml
version: 0.2
phases:
install:
runtime-versions:
nodejs: 10
commands:
- node --version
- npm install newman --global
- yum install -y jq
pre_build: