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
{
"name": "cloudproviders",
"_postman_id": "ff104412-e27d-4aec-8876-8aceea5f9e45",
"request": {
"method": "GET",
"header": [
],
"url": "{{apigw-root}}"
},
GetDataFunction:
Type: 'AWS::Serverless::Function'
Properties:
Handler: index-get.handler
CodeUri: src/
Runtime: nodejs12.x
AutoPublishAlias: live
DeploymentPreference:
Type: CodeDeployDefault.LambdaCanary10Percent5Minutes
Hooks:
version: 0.2
phases:
install:
runtime-versions:
python: 3.7
commands:
- python --version
build:
commands:
- pip install --user aws-sam-cli
CodeBuildLambdaTrigger:
Type: AWS::CodeBuild::Project
Properties:
Name:
Fn::Join:
- ''
- - Run
- "CodePipeline"
- Ref: AWS::StackName
Description: Build application
Pipeline:
Type: AWS::CodePipeline::Pipeline
Properties:
RoleArn: !GetAtt CodePipelineRole.Arn
Stages:
- Name: Source
Actions:
- InputArtifacts: []
Name: Source
ActionTypeId:
CodeCommitRepo:
Type: AWS::CodeCommit::Repository
Properties:
RepositoryName:
Ref: PipelineBucket
RepositoryDescription: CodeCommit Repository for Secrets Rotation Solution
Code:
S3:
Bucket: !Ref CodeCommitS3Bucket
Key: !Ref CodeCommitS3Key
Outputs:
MyVPC:
Value: !Ref VPC
Description: VPC ID - used by Cloud9
PublicSubnet1:
Value: !Ref SubnetAPublic
Description: SubnetAPublic - used by Cloud9
PrivateSubnet1:
Value: !Ref SubnetAPrivate
Description: SubnetAPrivate - used by Cloud9, Lambda Function, and RDS::DBSubnetGroup
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: SAR nested app stack test
Resources:
NestedApp:
Type: AWS::Serverless::Application
Properties:
Location:
ApplicationId: arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSMySQLRotationSingleUser
SemanticVersion: 1.1.8
- Name: BuildLambda
Actions:
- InputArtifacts:
- Name: MyApp
Name: BuildLambdaFunctions
ActionTypeId:
Category: Build
Owner: AWS
Version: '1'
Provider: CodeBuild
MyRDSInstanceRotationSecret:
Type: AWS::SecretsManager::Secret
Properties:
Description: 'This is my rds instance secret'
GenerateSecretString:
SecretStringTemplate: '{"username": "admin"}'
GenerateStringKey: 'password'
PasswordLength: 16
ExcludeCharacters: '"@/\'
Tags: