MLA-C01 Question 304
Single answerYou are tasked with deploying a machine learning infrastructure on AWS that requires flexibility in defining resources using Python and the ability to integrate with existing CI/CD pipelines. The infrastructure may also need frequent updates as new requirements emerge. Which AWS IaC option is most suitable for this scenario?
- A
AWS CloudFormation
- B
AWS Cloud Development Kit (AWS CDK)
- C
AWS Elastic Beanstalk
- D
AWS OpsWorks
Show answer and explanation
Correct answer: B
Explanation
AWS CDK is the most suitable choice for this scenario because it allows users to define infrastructure as code using high-level programming languages such as Python, which provides flexibility and programmability. This makes it easy to integrate with CI/CD pipelines and adapt to frequent updates. CloudFormation, while powerful, is more suitable for static, declarative definitions, and the other options (Elastic Beanstalk and OpsWorks) do not meet the specific requirements of defining resources programmatically.
- A. Incorrect.
AWS CloudFormation is a declarative IaC tool that allows you to define resources using JSON or YAML. While it is powerful for managing infrastructure, it lacks the flexibility of using high-level programming languages like Python, which is needed in this scenario.
- B. Correct.
AWS Cloud Development Kit (AWS CDK) is the correct option because it allows you to define AWS infrastructure using familiar programming languages like Python, which makes it suitable for integrating with CI/CD pipelines and adapting to frequent updates.
- C. Incorrect.
AWS Elastic Beanstalk is not an IaC tool. It is a platform-as-a-service (PaaS) solution for deploying and managing applications, and it does not provide the flexibility required for defining custom infrastructure using Python.
- D. Incorrect.
AWS OpsWorks is primarily used for configuration management and automating server configurations using Chef or Puppet. It is not designed for defining AWS resources programmatically using programming languages like Python.