{"id":8071,"date":"2022-04-19T09:46:45","date_gmt":"2022-04-19T07:46:45","guid":{"rendered":"https:\/\/geko.cloud\/?p=8071"},"modified":"2022-04-19T09:46:45","modified_gmt":"2022-04-19T07:46:45","slug":"consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1","status":"publish","type":"post","link":"https:\/\/geko.cloud\/en\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/","title":{"rendered":"Practical tips to improve your developments in CDK [Part 1]"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Practical tips to improve your developments in CDK<br \/>\nThe new AWS infrastructure as code framework, <a href=\"https:\/\/docs.aws.amazon.com\/cdk\/index.html\" target=\"_blank\" rel=\"noopener\"><strong>CDK,<\/strong><\/a> it\u2019s awakening interest in the DevOps world due to its multiple advantages. At Geko we are already using CDK and we can say that it is a very interesting alternative to both Cloudformation and Terraform. For those who want to introduce in the DevOps world or those companies that want to implement a DevOps model, CDK is the perfect tool since, it allows the use of programming languages already used by developers, reducing the learning curve and facilitating its adoption.<\/p>\n<p>However, after using CDK in production we can say that adopting CDK is not as easy as it might appear. For this reason, we have created this post with the intention of explaining some basic concepts of CDK and at the same time sharing with you advices based on our experience, for all those who are considering starting to use CDK or those who are already using it and they want to improve its use.<\/p>\n<p>&nbsp;<\/p>\n<h2>Naming convention for identifiers<\/h2>\n<p>In CDK there are many types of identifiers and each one has a purpose. Our first recommendation is that you inform yourself about how <strong><a href=\"https:\/\/docs.aws.amazon.com\/cdk\/v2\/guide\/identifiers.html#identifiers_paths\" target=\"_blank\" rel=\"noopener\">identifiers<\/a><\/strong> work and the importance they have in order to create resources in cloudformation. Identifiers in CDKs must be unique within the context in which they are created. This has many notable implications.<\/p>\n<p>For example, the same ID can be used for two constructs that are on two different stacks. However, if you try to use the same ID for two constructs on the same Stack, the application will return an error synthesizing or deploying in AWS. Our advice is to centralize, somehow, the generation of all identifiers, following the same nomenclature. This will help you to avoid repeat identifiers and it will make easier to read the cloudformation templates created with the CDK. You can use a helper function that, given a set of parameters, returns the identifier to be used in the constructs, as shown below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8040 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-1.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"676\" height=\"426\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-1.png 676w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-1-300x189.png 300w\" sizes=\"(max-width: 676px) 100vw, 676px\" \/><\/p>\n<p style=\"text-align: left;\">Try to simplify the naming convention that you define for the identifiers as much as possible, since the <strong><a href=\"https:\/\/docs.aws.amazon.com\/cdk\/index.html\" target=\"_blank\" rel=\"noopener\">logical and physical identifiers<\/a><\/strong> generated by CDK are usually very long and include hash codes that make them difficult to read. Always keep in mind that, once you have defined resource identifiers, you should not change them unless it is completely and absolutely necessary. Once you have deployed a resource with an identifier, if the identifier changes, the resource will be replaced with a new one. Imagine you&#8217;ve created an RDS instance in production and assigned an ID to it. If you change the RDS instance identifier in your CDK code, the next time you deploy to production the RDS instance will be removed and replaced with a new one. An RDS instance is created in the following CDK code snippet:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8042 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-2.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"761\" height=\"484\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-2.png 761w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-2-300x191.png 300w\" sizes=\"(max-width: 761px) 100vw, 761px\" \/><\/p>\n<p style=\"text-align: left;\">By deploying this code, an RDS instance will automatically deployed in a cloudormation stack:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8042 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-2.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"761\" height=\"484\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-2.png 761w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-2-300x191.png 300w\" sizes=\"(max-width: 761px) 100vw, 761px\" \/><\/p>\n<p style=\"text-align: left;\">This RDS instance has been created with the identifier Pro-Geko-Cloud-RDS, the values \u200b\u200bdefined for the environment and project attributes are the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-8046\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-4-300x81.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"300\" height=\"81\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-4-300x81.png 300w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-4.png 362w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p style=\"text-align: left;\">The cloudformation template generated by CDK is as follows:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8048 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-5.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"586\" height=\"404\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-5.png 586w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-5-300x207.png 300w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/p>\n<p style=\"text-align: left;\">The logical name of the RDS instance is ProGekoCloudRDS and a concatenated hash identifier as suffix. We will now modify the static get_identifier method to add the dpt attribute, as shown below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-8050\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-6-300x50.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"300\" height=\"50\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-6-300x50.png 300w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-6-768x127.png 768w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-6.png 775w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>We also set a value for the static attribute department:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8052 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-7.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"350\" height=\"115\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-7.png 350w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-7-300x99.png 300w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><\/p>\n<p style=\"text-align: left;\">If we execute a cdk diff command we can see that there are pending changes. Changes include replacing the RDS instance with a new instance called ProGekoCloudsalesRDS:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8054 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-8.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"1239\" height=\"463\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-8.png 1239w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-8-300x112.png 300w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-8-1024x383.png 1024w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-8-768x287.png 768w\" sizes=\"(max-width: 1239px) 100vw, 1239px\" \/><\/p>\n<p>As we have seen, identifiers are vital for a CDK application. Before you start generating source code, define a naming convention and follow it. One way to avoid unwanted identifier changes is to run the CDK diff command in your deploy pipeline, prior to deploying your infrastructure.<\/p>\n<p>Finally, try not to define names for any resource you provision in your application, let the CDK choose the names of the resources. <strong>Keep in mind that I&#8217;m talking about resource names, not identifiers.<\/strong> Every time you make changes in\u00a0 a cloudformation resource, it is possible that resource will be <strong><a href=\"https:\/\/docs.aws.amazon.com\/cdk\/index.html\" target=\"_blank\" rel=\"noopener\">replaced<\/a><\/strong> due to the changes you want to make are not compatible with the update of the resource. then, it is possible the update fails due to you defined a name for a resource that has to be replaced. AWS CloudFormation doesn&#8217;t replace a resource that has a custom name unless that custom name is changed to a different name. If you allow CDK to handle resource naming, in case you make any changes that involve replacing a resource, CDK automatically replaces the resource and assigns it a new name, <strong><a href=\"https:\/\/aws.amazon.com\/es\/premiumsupport\/knowledge-center\/cloudformation-custom-name\/\" target=\"_blank\" rel=\"noopener\">avoiding errors.<\/a><\/strong><\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Tagging<\/h2>\n<p style=\"text-align: left;\">Adding tags to AWS resources is a must. The <a href=\"https:\/\/aws.amazon.com\/es\/blogs\/apn\/how-better-tagging-can-help-organizations-optimize-expenses-and-improve-roi\/\" target=\"_blank\" rel=\"noopener\">advantages of using tags<\/a> are many and there aren\u2019t drawbacks. Adding tags in CDK is very easy, as shown in the following image:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8056 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-9.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"733\" height=\"482\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-9.png 733w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-9-300x197.png 300w\" sizes=\"(max-width: 733px) 100vw, 733px\" \/><\/p>\n<p style=\"text-align: left;\">Regarding which tags to use, it depends on several factors, however, the tag Name is essential especially because, as we have seen in the previous section, identifiers that CDK assigns to resources are unintelligible. Adding a tag Name to all resources makes it much easier to easily identify resources. We could also use the Owner tag in order to identify which department owns\u00a0 the infrastructure. The Project tag is a classic example, it is usually used to identify which resources belong to a project. In any case, even if you don\u2019t agree with the recommended tags, you should define a tagging policy aligned with the compliance of your company because it will greatly facilitate the management of your infrastructure, either to locate resources or to identify costs.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Testing<\/h2>\n<p style=\"text-align: left;\">Testing your application is always a best practice and good advice to follow. It helps us find bugs more easily, deliver higher quality software, and it can even help us develop faster if we use development methodologies like TDD. In CDK there are two types of <a href=\"https:\/\/docs.aws.amazon.com\/cdk\/v2\/guide\/testing.html\" target=\"_blank\" rel=\"noopener\">tests<\/a> that we are going to see.<\/p>\n<p>On the one hand, there are fine-grained tests, that are very similar to unit tests. In a fine-grained test you can perform various checks. For instance, you can check that your application is creating a certain type of resource, for example an RDS instance. You can also verify the properties of your resources. For example, it\u2019s possible to verify that the RDS instance that we have seen in the identifiers section are using MySQL version 8.0.16 as database engine:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8058 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-10.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"682\" height=\"372\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-10.png 682w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-10-300x164.png 300w\" sizes=\"(max-width: 682px) 100vw, 682px\" \/><\/p>\n<p style=\"text-align: left;\">To implement test in CDK you will need to import the <a href=\"https:\/\/docs.aws.amazon.com\/cdk\/api\/v2\/docs\/aws-cdk-lib.assertions-readme.html\" target=\"_blank\" rel=\"noopener\">assertions<\/a> module. If you use Python you can use <a href=\"https:\/\/docs.pytest.org\/en\/7.1.x\/\" target=\"_blank\" rel=\"noopener\">Pytest<\/a> to implement your tests.<\/p>\n<p style=\"text-align: left;\">On the other hand are the snapshot tests. These tests are used when you want to refactor the code of your CDK application. Use snapshot tests to check you don\u2019t introduce changes when refactoring your applications. In order to run snapshot tests in Python, you have to install the <strong><a href=\"https:\/\/github.com\/tophat\/syrupy\" target=\"_blank\" rel=\"noopener\">Syrupy<\/a><\/strong> python library. Once installed you can start creating your snapshot tests:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8061 size-full aligncenter\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-11.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"578\" height=\"252\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-11.png 578w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-11-300x131.png 300w\" sizes=\"(max-width: 578px) 100vw, 578px\" \/><\/p>\n<p style=\"text-align: left;\">This test has two parameters, the first one is the CDK <strong><a href=\"https:\/\/docs.aws.amazon.com\/cdk\/v2\/guide\/environments.html\" target=\"_blank\" rel=\"noopener\">environment<\/a><\/strong> and the second one is the snapshot parameter that represents the cloudformation template used as a reference to execute the snapshot test. Snapshot parameter is managed by the Syrupy library, you just have to define it. The test creates the stack to check in the first place. It obtains the cloudformation template of the stack and compares it with the snapshot parameter. If the template doesn\u2019t match with the snapshot parameter, the test fails. When executing a snapshot type test for the first time, you must define the \u2013snapshot-update flag, like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-8074\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/Captura-1024x70.jpg\" alt=\"\" width=\"1000\" height=\"69\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/Captura-1024x70.jpg 1024w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/Captura-300x21.jpg 300w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/Captura-768x53.jpg 768w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/Captura.jpg 1264w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<p style=\"text-align: left;\">When you run this command, Syrupy library will create a folder called __snapshots__ in your tests folder.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8063 size-full\" src=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-12.png\" alt=\"CDK geko consultor\u00eda cloud\" width=\"385\" height=\"355\" srcset=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-12.png 385w, https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/image-12-300x277.png 300w\" sizes=\"(max-width: 385px) 100vw, 385px\" \/><\/p>\n<p style=\"text-align: left;\">The cloudformation template generated by the CdkGekoStack stack will be saved in __snapshot__ folder. The next time you want to run the snapshot type test, you have to run the python -m pytest command without the \u2013snapshot-update flag. If the CdkGekoStack stack returns a template that doesn\u2019t match with the template that Syrupy has already saved in the __snapshot__ folder, the test will fail.<\/p>\n<p>&nbsp;<\/p>\n<h2 style=\"text-align: left;\">Resume<\/h2>\n<p style=\"text-align: left;\">In this post we have talked about naming convention, tagging and testing. Concepts as basic as important. We promise that in the<strong> next post, we are going to talk about more complex concepts such as property management and constructs.<\/strong> So far, we say goodbye. See you!<\/p>\n<p>If you require any further information, feel free to<strong><a href=\"https:\/\/geko.cloud\/en\/contact\/\" target=\"_blank\" rel=\"noopener\"> contact us.<\/a><\/strong><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Practical tips to improve your developments in CDK The new AWS infrastructure as code framework, CDK, it\u2019s awakening interest in the DevOps world due to its multiple advantages. At Geko we are already using CDK and we can say that it is a very interesting alternative to both Cloudformation and Terraform. For those who [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":8003,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[67],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Practical tips to improve your developments in CDK [Part 1] - Geko Cloud<\/title>\n<meta name=\"description\" content=\"Consejos para sacar mayor provecho a CDK. En Geko ya utilizamos CDK y consideramos que es una buena alternativa a Cloudformation o Terraform.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Practical tips to improve your developments in CDK [Part 1] - Geko Cloud\" \/>\n<meta property=\"og:description\" content=\"Consejos para sacar mayor provecho a CDK. En Geko ya utilizamos CDK y consideramos que es una buena alternativa a Cloudformation o Terraform.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/\" \/>\n<meta property=\"og:site_name\" content=\"Geko Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-19T07:46:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1640\" \/>\n\t<meta property=\"og:image:height\" content=\"924\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Javier\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@geko_cloud\" \/>\n<meta name=\"twitter:site\" content=\"@geko_cloud\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/\"},\"author\":{\"name\":\"Javier\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/7c019f6b932aa9a572eb16e0f57fd1b6\"},\"headline\":\"Practical tips to improve your developments in CDK [Part 1]\",\"datePublished\":\"2022-04-19T07:46:45+00:00\",\"dateModified\":\"2022-04-19T07:46:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/\"},\"wordCount\":1423,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/geko.cloud\/es\/#organization\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png\",\"articleSection\":[\"Labs\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/\",\"url\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/\",\"name\":\"Practical tips to improve your developments in CDK [Part 1] - Geko Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/geko.cloud\/es\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png\",\"datePublished\":\"2022-04-19T07:46:45+00:00\",\"dateModified\":\"2022-04-19T07:46:45+00:00\",\"description\":\"Consejos para sacar mayor provecho a CDK. En Geko ya utilizamos CDK y consideramos que es una buena alternativa a Cloudformation o Terraform.\",\"breadcrumb\":{\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#primaryimage\",\"url\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png\",\"contentUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png\",\"width\":1640,\"height\":924,\"caption\":\"Consejos pr\u00e1cticos para sacar mayor provecho a CDK\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\/\/geko.cloud\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Practical tips to improve your developments in CDK [Part 1]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/geko.cloud\/es\/#website\",\"url\":\"https:\/\/geko.cloud\/es\/\",\"name\":\"Geko Cloud\",\"description\":\"Servicios de consultor\u00eda cloud y devops\",\"publisher\":{\"@id\":\"https:\/\/geko.cloud\/es\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/geko.cloud\/es\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/geko.cloud\/es\/#organization\",\"name\":\"Geko Cloud\",\"url\":\"https:\/\/geko.cloud\/es\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png\",\"contentUrl\":\"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png\",\"width\":1650,\"height\":809,\"caption\":\"Geko Cloud\"},\"image\":{\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/geko_cloud\",\"https:\/\/www.instagram.com\/gekocloud\/\",\"https:\/\/www.linkedin.com\/company\/gekocloud\",\"https:\/\/www.youtube.com\/channel\/UC5EFLCqUM7fEaXSa_0nWowQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/7c019f6b932aa9a572eb16e0f57fd1b6\",\"name\":\"Javier\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/geko.cloud\/es\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/25d931800703a3703848377afd700a83?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/25d931800703a3703848377afd700a83?s=96&d=mm&r=g\",\"caption\":\"Javier\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Practical tips to improve your developments in CDK [Part 1] - Geko Cloud","description":"Consejos para sacar mayor provecho a CDK. En Geko ya utilizamos CDK y consideramos que es una buena alternativa a Cloudformation o Terraform.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/","og_locale":"en_US","og_type":"article","og_title":"Practical tips to improve your developments in CDK [Part 1] - Geko Cloud","og_description":"Consejos para sacar mayor provecho a CDK. En Geko ya utilizamos CDK y consideramos que es una buena alternativa a Cloudformation o Terraform.","og_url":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/","og_site_name":"Geko Cloud","article_published_time":"2022-04-19T07:46:45+00:00","og_image":[{"width":1640,"height":924,"url":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png","type":"image\/png"}],"author":"Javier","twitter_card":"summary_large_image","twitter_creator":"@geko_cloud","twitter_site":"@geko_cloud","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#article","isPartOf":{"@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/"},"author":{"name":"Javier","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/7c019f6b932aa9a572eb16e0f57fd1b6"},"headline":"Practical tips to improve your developments in CDK [Part 1]","datePublished":"2022-04-19T07:46:45+00:00","dateModified":"2022-04-19T07:46:45+00:00","mainEntityOfPage":{"@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/"},"wordCount":1423,"commentCount":0,"publisher":{"@id":"https:\/\/geko.cloud\/es\/#organization"},"image":{"@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#primaryimage"},"thumbnailUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png","articleSection":["Labs"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/","url":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/","name":"Practical tips to improve your developments in CDK [Part 1] - Geko Cloud","isPartOf":{"@id":"https:\/\/geko.cloud\/es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#primaryimage"},"image":{"@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#primaryimage"},"thumbnailUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png","datePublished":"2022-04-19T07:46:45+00:00","dateModified":"2022-04-19T07:46:45+00:00","description":"Consejos para sacar mayor provecho a CDK. En Geko ya utilizamos CDK y consideramos que es una buena alternativa a Cloudformation o Terraform.","breadcrumb":{"@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#primaryimage","url":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png","contentUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2022\/04\/cdk-prova.png","width":1640,"height":924,"caption":"Consejos pr\u00e1cticos para sacar mayor provecho a CDK"},{"@type":"BreadcrumbList","@id":"https:\/\/geko.cloud\/es\/consejos-practicos-para-sacar-mayor-provecho-a-cdk-parte-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/geko.cloud\/en\/"},{"@type":"ListItem","position":2,"name":"Practical tips to improve your developments in CDK [Part 1]"}]},{"@type":"WebSite","@id":"https:\/\/geko.cloud\/es\/#website","url":"https:\/\/geko.cloud\/es\/","name":"Geko Cloud","description":"Servicios de consultor\u00eda cloud y devops","publisher":{"@id":"https:\/\/geko.cloud\/es\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/geko.cloud\/es\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/geko.cloud\/es\/#organization","name":"Geko Cloud","url":"https:\/\/geko.cloud\/es\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/","url":"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png","contentUrl":"https:\/\/geko.cloud\/wp-content\/uploads\/2021\/10\/geko_logo-positivo.png","width":1650,"height":809,"caption":"Geko Cloud"},"image":{"@id":"https:\/\/geko.cloud\/es\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/geko_cloud","https:\/\/www.instagram.com\/gekocloud\/","https:\/\/www.linkedin.com\/company\/gekocloud","https:\/\/www.youtube.com\/channel\/UC5EFLCqUM7fEaXSa_0nWowQ"]},{"@type":"Person","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/7c019f6b932aa9a572eb16e0f57fd1b6","name":"Javier","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/geko.cloud\/es\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/25d931800703a3703848377afd700a83?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/25d931800703a3703848377afd700a83?s=96&d=mm&r=g","caption":"Javier"}}]}},"_links":{"self":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/8071"}],"collection":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/comments?post=8071"}],"version-history":[{"count":6,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/8071\/revisions"}],"predecessor-version":[{"id":8083,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/posts\/8071\/revisions\/8083"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/media\/8003"}],"wp:attachment":[{"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/media?parent=8071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/categories?post=8071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geko.cloud\/en\/wp-json\/wp\/v2\/tags?post=8071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}