How to use where clause in Knex
Create refunds with Stripe
Load HTML with Cheerio
How to send POST request with Axios
Find intersection of array in Lodash
Powered by Official white Bloop logo with a period

Terms / Privacy / Search / Support

  • import { App, Stack } from '@aws-cdk/core';
    import * as codebuild from '@aws-cdk/aws-codebuild';
    import * as codecommit from '@aws-cdk/aws-codecommit';
    import * as targets from '@aws-cdk/aws-events-targets';
    
    const app = new App();
    
    const account1 = '11111111111';
    const account2 = '22222222222';
    
    const stack1 = new Stack(app, 'Stack1', { env: { account: account1, region: 'us-west-1' } });
    const repo = new codecommit.Repository(stack1, 'Repository', {
      repositoryName: 'myrepository',
    });
    
    const stack2 = new Stack(app, 'Stack2', { env: { account: account2, region: 'us-east-1' } });
    const project = new codebuild.Project(stack2, 'Project', {
      // ...
    });
    
    repo.onCommit('OnCommit', {
      target: new targets.CodeBuildProject(project),
    });
    
    Docs
  • import { App, Stack } from '@aws-cdk/core';
    import * as ec2 from '@aws-cdk/aws-ec2';
    import * as ecs from '@aws-cdk/aws-ecs';
    import * as ecsPatterns from '@aws-cdk/aws-ecs-patterns';
    import * as cxapi from '@aws-cdk/cx-api';
    import * as path from 'path';
    
    const app = new App();
    
    const stack = new Stack(app, 'aws-ecs-patterns-queue');
    stack.node.setContext(cxapi.ECS_REMOVE_DEFAULT_DESIRED_COUNT, true);
    
    const vpc = new ec2.Vpc(stack, 'VPC', {
      maxAzs: 2,
    });
    
    new ecsPatterns.QueueProcessingFargateService(stack, 'QueueProcessingService', {
      vpc,
      memoryLimitMiB: 512,
      image: new ecs.AssetImage(path.join(__dirname, '..', 'sqs-reader')),
    });
    
    Docs
  • import { AttributeType } from '@aws-cdk/aws-dynamodb';
    import { GlobalTable } from '@aws-cdk/aws-dynamodb-global';
    import { App } from '@aws-cdk/core';
    
    const app = new App();
    new GlobalTable(app, 'globdynamodb', {
      partitionKey: { name: 'hashKey', type: AttributeType.STRING },
      tableName: 'GlobalTable',
      regions: [ "us-east-1", "us-east-2", "us-west-2" ],
    });
    app.synth();
    
    Docs
  • import * as cdk from '@aws-cdk/core';
    import * as servicediscovery from '../lib';
    
    const app = new cdk.App();
    const stack = new cdk.Stack(app, 'aws-servicediscovery-integ');
    
    const namespace = new servicediscovery.PublicDnsNamespace(stack, 'Namespace', {
      name: 'foobar.com',
    });
    
    const service = namespace.createService('Service', {
      name: 'foo',
      dnsRecordType: servicediscovery.DnsRecordType.CNAME,
      dnsTtl: cdk.Duration.seconds(30),
    });
    
    service.registerCnameInstance('CnameInstance', {
      instanceCname: 'service.pizza',
    });
    
    app.synth();
    
    Docs
  • import * as cdk from '@aws-cdk/core';
    import * as servicediscovery from '../lib';
    
    const app = new cdk.App();
    const stack = new cdk.Stack(app, 'aws-servicediscovery-integ');
    
    const namespace = new servicediscovery.PublicDnsNamespace(stack, 'Namespace', {
      name: 'foobar.com',
    });
    
    const service = namespace.createService('Service', {
      name: 'foo',
      dnsRecordType: servicediscovery.DnsRecordType.CNAME,
      dnsTtl: cdk.Duration.seconds(30),
    });
    
    service.registerCnameInstance('CnameInstance', {
      instanceCname: 'service.pizza',
    });
    
    app.synth();
    
    
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples