Skip to content

Instantly share code, notes, and snippets.

View PaulDuvall's full-sized avatar

Paul Duvall PaulDuvall

  • Amazon Web Services
  • us-east-1
View GitHub Profile
CodeCommitRepo:
Type: AWS::CodeCommit::Repository
Properties:
RepositoryName:
Ref: PipelineBucket
RepositoryDescription: CodeCommit Repository for Secrets Rotation Solution
Code:
S3:
Bucket: !Ref CodeCommitS3Bucket
Key: !Ref CodeCommitS3Key
version: 0.2
phases:
install:
runtime-versions:
python: 3.7
commands:
- python --version
build:
commands:
- pip install --user aws-sam-cli
- Name: BuildLambda
Actions:
- InputArtifacts:
- Name: MyApp
Name: BuildLambdaFunctions
ActionTypeId:
Category: Build
Owner: AWS
Version: '1'
Provider: CodeBuild
{
"name": "cloudproviders",
"_postman_id": "ff104412-e27d-4aec-8876-8aceea5f9e45",
"request": {
"method": "GET",
"header": [
],
"url": "{{apigw-root}}"
},
version: 0.2
phases:
install:
runtime-versions:
nodejs: 10
commands:
- node --version
- npm install newman --global
- yum install -y jq
pre_build:
@PaulDuvall
PaulDuvall / stelligent-blog-serverless-function-index-get.yml
Last active June 11, 2020 18:17
Use the AWS SAM to define a Serverless Function
Type: 'AWS::Serverless::Function'
Properties:
Handler: index-get.handler
CodeUri: src/
Runtime: nodejs12.x
AutoPublishAlias: live
DeploymentPreference: ...
MemorySize: 128
Policies:
- DynamoDBReadPolicy:
CodeBuildCommands:
Type: AWS::CodeBuild::Project
DependsOn: CodeBuildRole
Properties:
Name:
Ref: AWS::StackName
Description: Build application
ServiceRole:
Fn::GetAtt:
- CodeBuildRole
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
Pipeline:
Type: AWS::CodePipeline::Pipeline
Properties:
RoleArn: !GetAtt CodePipelineRole.Arn
Stages:
- Name: Source
Actions:
- InputArtifacts: []
Name: Source
ActionTypeId:
@PaulDuvall
PaulDuvall / diagrams-as-code.sh
Last active June 15, 2020 16:18
stelligent-blog-diagrams-as-code
git clone https://github.com/PaulDuvall/diagrams-as-code.git
cd diagrams-as-code
sudo chmod +x *.sh
./launch-stack.sh