Taken from this blog article by Matthew Broberg (Redhat). I just wanted a small part and not the whole thing and this section was not linked.
Install pyenv via homebrew:
$ brew install pyenvTaken from this blog article by Matthew Broberg (Redhat). I just wanted a small part and not the whole thing and this section was not linked.
Install pyenv via homebrew:
$ brew install pyenv| 22 directories, 74 files | |
| ➜ aws-cdk git:(jjacobs/bump/feature) tree <aws:sandbox> | |
| . | |
| ├── __tests__ | |
| │ └── test.cognito.ts | |
| ├── bin | |
| │ └── cognito.ts | |
| ├── cdk.json | |
| ├── lib | |
| │ ├── codebuild-lambda.ts |
| import { Effect, PolicyStatement, Role, ServicePrincipal } from '@aws-cdk/aws-iam'; | |
| import { CfnOutput, Construct } from '@aws-cdk/core'; | |
| interface SMSAntispamCodePipelineRoleProps { | |
| roleName: string; | |
| } | |
| /** | |
| * SMSAntispamCodePipelineRole Construct | |
| * |
| import { Effect, PolicyStatement, Role, ServicePrincipal } from '@aws-cdk/aws-iam'; | |
| import { CfnOutput, Construct } from '@aws-cdk/core'; | |
| interface SMSAntispamCodePipelineRoleProps { | |
| roleName: string; | |
| } | |
| /** | |
| * SMSAntispamCodePipelineRole Construct | |
| * |
| #!/usr/bin/env node | |
| import { CfnDeletionPolicy, CfnResource, Construct } from '@aws-cdk/core'; | |
| import { AwsCustomResource } from '@aws-cdk/custom-resources'; | |
| export interface ProtectionPoliciesProps { | |
| resourceDeletionPolicy?: string; // "DELETE" | "RETAIN" | "SNAPSHOT" | |
| terminationProtection?: boolean; | |
| } | |
| /** |
| import cdk = require('@aws-cdk/core'); | |
| import { Bucket } from '@aws-cdk/aws-s3'; | |
| import { AwsCustomResource } from '@aws-cdk/custom-resources'; | |
| export class TerminationProtectionStack extends cdk.Stack { | |
| constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
| super(scope, id, props); | |
| // Enable stack termination protection | |
| // using the AWS SDK CloudFormation updateTerminationProtection API: |
| #!/usr/bin/env node | |
| import 'source-map-support/register'; | |
| import cdk = require('@aws-cdk/core'); | |
| import { StackSampleStack } from '../lib/stack_sample-stack'; | |
| // import { Effect, PolicyDocument, PolicyStatement } from '@aws-cdk/aws-iam'; | |
| const app = new cdk.App(); | |
| const env: cdk.Environment = { | |
| account: app.node.tryGetContext("account"), |
| import cdk = require('@aws-cdk/core'); | |
| import { Bucket } from '@aws-cdk/aws-s3'; | |
| import { Effect, PolicyDocument, PolicyStatement } from '@aws-cdk/aws-iam'; | |
| export class StackSampleStack extends cdk.Stack { | |
| constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
| super(scope, id, props); | |
| // doesn't work (won't show up in synth and after deploy, I can still destroy) | |
| const doc = new PolicyDocument(); |
| { | |
| "app": "python3 app.py", | |
| "context": { | |
| "serviceName": "vpc-cdk", | |
| "dev": { | |
| "cidr": "10.60.0.0/16", | |
| "vpcAzCount": 1, | |
| "region": "us-east-1" | |
| } | |
| } |
| #!/usr/bin/env node | |
| import cdk = require('@aws-cdk/core'); | |
| import 'source-map-support/register'; | |
| import { ComponentStack } from '../lib/component-stack'; | |
| import { PipelineStack } from '../lib/pipeline-stack'; | |
| import { config } from '../scripts/config'; | |
| const app = new cdk.App(); | |
| const env: cdk.Environment = { |