Se ha denunciado esta presentación.
Se está descargando tu SlideShare.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

0

Compartir

Introduction to the AWS Cloud Development Kit (CDK): Opinionated Infrastructure as Code

The AWS Cloud Development Kit (AWS CDK) is a new framework for creating infrastructure as code with programming languages including TypeScript, Java, and Python. The CDK models cloud resources as constructs. Low-level constructs describe individual resources like an Amazon (S3) bucket. The high-level constructs are composed of low-level constructs, configurations, and application logic; for instance, an Amazon S3 bucket for serving static web assets with a Amazon CloudFront distribution and strong security settings. The CDK deploys your resources using AWS CloudFormation. The CDK includes a set of opinionated constructs that follow AWS Well Architected best practices. You can create custom constructs that meet your organization's needs and distribute them with language native package management tools too.

  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Introduction to the AWS Cloud Development Kit (CDK): Opinionated Infrastructure as Code

  1. 1. P U B L I C S E C T O R S U M M I T Washington, DC
  2. 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Introduction to the AWS Cloud Development Kit (CDK): Opinionated Infrastructure as Code Ryan Malecky Sr Solutions Architect Amazon Web Services 3 0 9 2 6 5
  3. 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Manual � Easy to get started � Not reproducible � Error prone � Time consuming Manual High level Low level
  4. 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Scripted � What happens if an API call fails? � How do I make updates? � How do I know a resource is ready? � How do I roll back? Scripted Manual High level Low level
  5. 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Resource provisioning engines AWS CloudFormation template (JSON/YAML) Desired state configuration Declarative Scripted Manual High level Low level � Easy to automate � Reproducible � Configuration syntax � No abstraction, lots of details
  6. 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Document Object Models (DOMs) Troposphere Python SparkleFormation Ruby GoFormation Go … if statements, for loops, IDE benefits Ex: 218 lines of Troposphere for a VPC AWS CloudFormati on Template � Real code ♥️ � Desired state � Abstraction is not built-in DOMs Declarative Scripted Manual High level Low level
  7. 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T
  8. 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Developer preview AWS CloudFormation template AWS CDK application Stack(s) Construct Construct AWS CDK Componentize d DOMs Declarative Scripted Manual High level Low level Resources
  9. 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T AWS Construct Library AWS CDK Developer preview Componentize d DOMs Declarative Scripted Manual High level Low level
  10. 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T AWS Cloud Development Kit (CDK) Open source framework to define cloud infrastructure in popular programming languages ‘By compiling our source module using jsii, we can now package it as modules in one of the supported target languages.’ JSII (JavaScript Interoperability Interface)
  11. 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T AWS Cloud Development Kit (CDK) Provides library of higher-level resource types (“construct” classes) that have AWS best practices built in by default  Think constructs as cloud components  Constructs can represent architectures of any complexity
  12. 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T AWS Cloud Development Kit (CDK) Provisions resources with AWS CloudFormation  Synthesize and print the CloudFormation template  Deploy CloudFormation stacks directly Supports all AWS CloudFormation resource types  Create low-level resources from CloudFormation Resource Specification on a regular basis  Cfnxyz classes matches 1:1 with resources in CloudFormation (L1 Constructs)  Provide high level abstraction via the AWS construct library
  13. 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T AWS construct library (L2 constructs) • AWS Lambda • Amazon API Gateway • AWS DynamoDB • AWS Step Functions • Amazon CloudWatch • Metrics, alarms, dashboards • AWS CodePipeline • AWS Auto Scaling • Amazon Elastic Cloud Compute (Amazon EC2) • VPCs, security groups, Auto Scaling • ……
  14. 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T CDK workflow cdk bootstrap - Deploys the CDK toolkit stack into an AWS environment cdk init - Create a new CDK project Add the constructs your code needs e.g. npm install @aws-cdk/aws-lambda @aws-cdk/aws-apigateway Compile your code if needed e.g. npm run build cdk synth - Synthesizes and prints the CloudFormation template for the stack cdk deploy - Deploys the stack(s) into your AWS account cdk destroy - Destroy the stack(s)
  15. 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Demos 1. Workflow 2. Building an Application 3. Building a Construct
  16. 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T
  17. 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Next steps • Try out the CDK • https://cdkworkshop.com • https://docs.aws.amazon.com/cdk/api/latest/ • https://github.com/eladb/awesome-cdk • Engage with the community • https://github.com/awslabs/aws-cdk • https://gitter.im/awslabs/aws-cdk
  18. 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T
  19. 19. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.P U B L I C S E C TO R S U M M I T Ryan Malecky rmalecky@amazon.com

    Sé el primero en comentar

    Inicia sesión para ver los comentarios

The AWS Cloud Development Kit (AWS CDK) is a new framework for creating infrastructure as code with programming languages including TypeScript, Java, and Python. The CDK models cloud resources as constructs. Low-level constructs describe individual resources like an Amazon (S3) bucket. The high-level constructs are composed of low-level constructs, configurations, and application logic; for instance, an Amazon S3 bucket for serving static web assets with a Amazon CloudFront distribution and strong security settings. The CDK deploys your resources using AWS CloudFormation. The CDK includes a set of opinionated constructs that follow AWS Well Architected best practices. You can create custom constructs that meet your organization's needs and distribute them with language native package management tools too.

Vistas

Total de vistas

1.001

En Slideshare

0

De embebidos

0

Número de embebidos

1

Acciones

Descargas

0

Compartidos

0

Comentarios

0

Me gusta

0

×