template.yaml 을 우클릭하여 Sync Serverless Application 선택
아래와 같이 Create Stack 에 스택의 이름을 정하고, 빌드 프로세스가 생성하는 배포 패키지를 호스팅할 S3 버킷을 선택하고 Sync를 누르면 CloudFormation을 사용하여 리소스를 구성하고 스택를 생성합니다
배포가 완료된 모습
배포한 템플릿 코드
AWSTemplateFormatVersion:'2010-09-09'Transform: AWS::Serverless-2016-10-31Description:> s3lambda Sample SAM Template for s3lambda# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rstGlobals: Function: Timeout:3 MemorySize:128Resources: HelloWorldFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: CodeUri: hello-world/ Handler:app.lambdaHandler Runtime:nodejs16.x Architectures:- arm64 Policies:- S3ReadPolicy: BucketName:!Sub "olobo" Events: HelloWorld: Type:S3 # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api Properties: Bucket: Ref: Bucket1 Events: s3:ObjectCreated:Put Bucket1: Type: AWS::S3::Bucket