Sky Archive

자격증/AWS Developer Associate

[AWS] Certified Developer Associate Dump 문제 018

Anchovy ʕ-᷅ᴥ-᷄ʔ 2021. 8. 11. 21:50

Given the source code for an AWS Lambda function in the local store.py containing a handler function called get_store and the following AWS CloudFormation template:

What should be done to prepare the template so that it can be deployed using the AWS CLI command aws cloudformation deploy?

 

A. Use aws cloudformation compile to base64 encode and embed the source file into a modified CloudFormation template.

B. Use aws cloudformation package to upload the source code to an Amazon S3 bucket and produce a modified CloudFormation template.

C. Use aws lambda zip to package the source file together with the CloudFormation template and deploy the resulting zip archive.

D. Use aws serverless create-package to embed the source file directly into the existing CloudFormation template.


get_store라는 핸들러 함수와 다음 AWS CloudFormation 템플릿이 포함된 로컬 store.py의 AWS Lambda 함수에 대한 소스 코드가 지정됨:
AWS CLI 명령 aws 클라우드포메이션 배포를 사용하여 템플릿을 배포할 수 있도록 템플릿을 준비하려면 어떻게 해야 하는가?


A. aws 클라우드 양식 컴파일을 사용하여 base64 인코딩하고 원본 파일을 수정된 CloudFormation 템플릿에 포함하십시오.
B. aws 클라우드 포메이션 패키지를 사용하여 소스 코드를 Amazon S3 버킷에 업로드하고 수정된 CloudFormation 템플릿을 생성하십시오.
C. 소스 파일을 CloudFormation 템플릿과 함께 패키징하고 결과 zip 아카이브를 배포하려면 aws 람다 zip을 사용하십시오.
D. aws serverless create-package를 사용하여 원본 파일을 기존 CloudFormation 템플릿에 직접 포함하십시오.


정답↓

더보기

B

B가 맞고 질문에 aws cli가 지정되지 않은 경우에도 D를 사용할 수 있다(SAM은 서버 없는 cli를 사용한다)

 

B is correct, D can also be used if aws cli is not specified in the question (SAM uses serverless cli)