회사는 AWS CodePipeline 파이프라인을 사용하여 일주일에 여러 번 Amazon API Gateway API에 대한 업데이트를 배포합니다. 업데이트 프로세스의 일부로 회사는 API에서 API용 JavaScript SDK를 내보냅니다. 게이트웨이 콘솔 및 SDK를 Amazon S3 버킷에 업로드 회사는 S3 버킷을 원본 웹 클라이언트로 사용하는 Amazon CloudFront 배포를 구성한 다음 CloudFront 배포의 엔드포인트를 사용하여 SDK를 다운로드합니다. DevOps 엔지니어는 새 API 배포 중에 새 SDK를 자동으로 사용할 수 있도록 솔루션을 구현해야 합니다. 이러한 요구 사항을 충족하는 솔루션은 무엇입니까?
정답: A
This solution would allow the company to automate the process of updating the SDK and making it available to web clients. By adding a CodePipeline action immediately after the deployment stage of the API, the Lambda function will be invoked automatically each time the API is updated. The Lambda function should be able to download the new SDK from API Gateway, upload it to the S3 bucket and also create a CloudFront invalidation for the SDK path so that the latest version of the SDK is available for the web clients. This is the most straight forward solution and it will meet the requirements.
DOP-C02-KR 문제 182
DevOps 엔지니어는 컨테이너 이미지를 Amazon ECR 저장소에 게시하는 AWS CodePipeline 파이프라인을 구성해야 합니다. 파이프라인은 이전 실행이 완료될 때까지 대기해야 하며, AWS CodeConnections에 연결된 Git 저장소에 새로운 Git 태그가 푸시될 때 실행되어야 합니다. 기존 배포 파이프라인은 새로운 컨테이너 이미지 게시에 응답하여 실행되어야 합니다. 어떤 솔루션이 이러한 요구 사항을 충족시킬까요?
정답: A
* CodePipeline V2 with QUEUED modeensures that new executions wait for the previous execution to finish, preventing overlapping runs. * Adding a trigger filter to listen forGit tagstriggers the pipeline only on new tag pushes. * An EventBridge rule can detect new image pushes to ECR and start the deployment pipeline, integrating the build and deploy pipelines effectively. * SUPERSEDED mode cancels the previous run when a new one starts, which is not desired here. * Using branches instead of tags would trigger on all commits, not just releases. References: AWS CodePipeline V2 Triggers AWS CodePipeline Execution Modes
DOP-C02-KR 문제 183
회사는 ALB(Application Load Balancer) 뒤에 있는 Amazon EC2 인스턴스에 웹 애플리케이션을 배포합니다. 회사는 AWS CodeCommit 리포지토리에 애플리케이션 코드를 저장합니다. 코드가 메인 브랜치에 병합되면 AWS Lambda 함수가 AWS CodeBuild 프로젝트를 호출합니다. CodeBuild 프로젝트는 코드를 패키징하고, 패키징된 코드를 AWS CodeArtifact에 저장하고, AWS 시스템 관리자 Run Command를 호출하여 패키징된 코드를 EC2 인스턴스에 배포합니다. 이전 배포에서는 결함, 패키지된 코드의 최신 버전을 실행하지 않는 EC2 인스턴스, 인스턴스 간 불일치가 발생했습니다. 보다 안정적인 배포 솔루션을 구현하려면 DevOps 엔지니어가 수행해야 하는 작업 조합은 무엇입니까? (2개를 선택하세요.)
정답: A,C
To implement a more reliable deployment solution, a DevOps engineer should take the following actions: Create a pipeline in AWS CodePipeline that uses the CodeCommit repository as a source provider. Configure pipeline stages that run the CodeBuild project in parallel to build and test the application. In the pipeline, pass the CodeBuild project output artifact to an AWS CodeDeploy action. This action will improve the deployment reliability by automating the entire process from code commit to deployment, reducing human errors and inconsistencies. By running the build and test stages in parallel, the pipeline can also speed up the delivery time and provide faster feedback. By using CodeDeploy as the deployment action, the pipeline can leverage the features of CodeDeploy, such as traffic shifting, health checks, rollback, and deployment configuration123 Create an AWS CodeDeploy application and a deployment group to deploy the packaged code to the EC2 instances. Configure the ALB for the deployment group. This action will improve the deployment reliability by using CodeDeploy to orchestrate the deployment across multiple EC2 instances behind an ALB. CodeDeploy can perform blue/green deployments or in-place deployments with traffic shifting, which can minimize downtime and reduce risks. CodeDeploy can also monitor the health of the instances during and after the deployment, and automatically roll back if any issues are detected. By configuring the ALB for the deployment group, CodeDeploy can register and deregister instances from the load balancer as needed, ensuring that only healthy instances receive traffic45 The other options are not correct because they do not improve the deployment reliability or follow best practices. Creating separate pipeline stages that run a CodeBuild project to build and then test the application is not a good option because it will increase the pipeline execution time and delay the feedback loop. Creating individual Lambda functions that use CodeDeploy instead of Systems Manager to run build, test, and deploy actions is not a valid option because it will add unnecessary complexity and cost to the solution. Lambda functions are not designed for long-running tasks such as building or deploying applications. Creating an Amazon S3 bucket and modifying the CodeBuild project to store the packages in the S3 bucket instead of in CodeArtifact is not a necessary option because it will not affect the deployment reliability. CodeArtifact is a secure, scalable, and cost-effective package management service that can store and share software packages for application development67 1: What is AWS CodePipeline? - AWS CodePipeline 2: Create a pipeline in AWS CodePipeline - AWS CodePipeline 3: Deploy an application with AWS CodeDeploy - AWS CodePipeline 4: What is AWS CodeDeploy? - AWS CodeDeploy 5: Configure an Application Load Balancer for your blue/green deployments - AWS CodeDeploy 6: What is AWS Lambda? - AWS Lambda 7: What is AWS CodeArtifact? - AWS CodeArtifact