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 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 { HttpIamAuthorizer } from '@aws-cdk/aws-apigatewayv2-authorizers';
    import { HttpUrlIntegration } from '@aws-cdk/aws-apigatewayv2-integrations';
    
    declare const principal: iam.AnyPrincipal;
    
    const authorizer = new HttpIamAuthorizer();
    
    const httpApi = new apigwv2.HttpApi(this, 'HttpApi', {
      defaultAuthorizer: authorizer,
    });
    
    const routes = httpApi.addRoutes({
      integration: new HttpUrlIntegration('BooksIntegration', 'https://get-books-proxy.myproxy.internal'),
      path: '/books/{book}',
    });
    
    routes[0].grantInvoke(principal);
    
    Docs
  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as assets from '@aws-cdk/assets';
    import * as apigateway from '@aws-cdk/aws-apigateway';
    import * as iam from '@aws-cdk/aws-iam';
    import * as cdk from '@aws-cdk/core';
    
    declare const dockerImage: cdk.DockerImage;
    declare const grantable: iam.IGrantable;
    declare const localBundling: cdk.ILocalBundling;
    const assetApiDefinition = new apigateway.AssetApiDefinition('path', /* all optional props */ {
      assetHash: 'assetHash',
      assetHashType: cdk.AssetHashType.SOURCE,
      bundling: {
        image: dockerImage,
    
        // the properties below are optional
        command: ['command'],
        entrypoint: ['entrypoint'],
        environment: {
          environmentKey: 'environment',
        },
        local: localBundling,
        outputType: cdk.BundlingOutput.ARCHIVED,
        securityOpt: 'securityOpt',
        user: 'user',
        volumes: [{
          containerPath: 'containerPath',
          hostPath: 'hostPath',
    
          // the properties below are optional
          consistency: cdk.DockerVolumeConsistency.CONSISTENT,
        }],
        workingDirectory: 'workingDirectory',
      },
      exclude: ['exclude'],
      follow: assets.FollowMode.NEVER,
      followSymlinks: cdk.SymlinkFollowMode.NEVER,
      ignoreMode: cdk.IgnoreMode.GLOB,
      readers: [grantable],
      sourceHash: 'sourceHash',
    });
    
    Docs
  • // The code below shows an example of how to instantiate this type.
    // The values are placeholders you should change.
    import * as cx_api from '@aws-cdk/cx-api';
    import * as pipelines from '@aws-cdk/pipelines';
    
    declare const cloudFormationStackArtifact: cx_api.CloudFormationStackArtifact;
    const stackDeployment = pipelines.StackDeployment.fromArtifact(cloudFormationStackArtifact);
    
    Docs
  • import * as iam from '@aws-cdk/aws-iam';
    import * as iotevents from '@aws-cdk/aws-iotevents';
    
    declare const grantable: iam.IGrantable;
    const input = iotevents.Input.fromInputName(this, 'MyInput', 'my_input');
    
    input.grantWrite(grantable);
    
    Docs
  • Powered by Official black Bloop logo with a period
    download the IDE extension

    View other examples