© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
,
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
•
•
•
• CA P M PS B
• D L T
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
/
A
a d fe
A n
b L
Wm iaSa n a
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1 9 6 961 D
요청 소요 시간
41 ,
7 60
6 2 .-
, 2
.-
f ei
• ,() 2 % ( d *% % l bk% ( bk a0 (. * :94
• (). 2 % ( d * % % l bk% ) bk a0 (( * :94
1 9 PD L I D LI AAI ML MI 6 D PDMC I MC : MD 8 M B AI C 1 9 BDI % D B I MC D D B % IA M LM ,
MC 9 D 3I DM MS 5 MC M 6 I L IM M MC 9 D 3I DM M% I PD DBD MI D 9 D 3 DM
( Wg f U% 5 a f U ch
961 0 ,
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
I EC A PCMB . 9 5 G
t d
yv
1 JIC M
km i d
0 IN M B
p tc
0 I w e
o
tc km l
r
I L 8 MBI ,
0 1 0I # 2I
ab
(), / MI , /
un m ht
() /
o nS
s jgm
.83 vT W
b jgm W W
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
- - / -
. . - -
/
/
/ /
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
F F / E C H CA C
( CH
EA
, A
H C
H
CAA
C)A
.C C
) H
0 CC
N R P OLTM
( CH EA SW
ACE H
(0
N R U
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
11
.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
. 2
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
& &
Source Build Test Production
Continuous Integration
Continuous Delivery
Continuous Deployment
• A , F e
• A CI A
• , CI
• E f a
• E f a - , , ,
c a R d
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
. . ( . )
C ?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
• IOPFW / J
N
• Y S C T
IOP L A I
• IOP Y
M W
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "2 Tier Web Application Template",
"Parameters" : {
"KeyName": {
"Type": "AWS::EC2::KeyPair::KeyName"
},
"InstanceType" : {
"Type" : "String",
"Default" : "t2.small”
}
},
"Resources" : {
"ALBSecurityGroup" : {
"Type" : "AWS::EC2::SecurityGroup",
"Properties" : {
"GroupDescription" : "ALB Security Group",
"SecurityGroupIngress" : [
{"IpProtocol" : "tcp", "FromPort" : "80", "ToPort" : "80", "CidrIp" : "0.0.0.0/0"}
],
"VpcId" : { "Fn::ImportValue" : { "Fn::Sub": "${VPCStackName}-VPCID" } }
}
},
…
}
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
( )
• ) GP S I A
• ) M , ) (
B C LF C T E M D
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• M D L F
• L CcI /
•
•
• L K R e A
• M L S a e C T R F
• W de A
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• ( A C cG M
F
• / A C A , C C
• - C C
• ( C
• C A A
• AC Sa F
• C ( A C L S N
, L S IT bd
• C P
• I C cV
) /A Ob
Template
Alpha Gamma Prod
Lambda
Function
AWS
Resources
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31 # CloudFormation Template SAM Template
Resources:
GetHtmlFunction:
Type: AWS::Serverless::Function # Lambda Function
Properties:
CodeUri: s3://sam-demo-bucket/my_function.zip
Handler: index.gethtml
Runtime: nodejs4.3
Policies: AmazonDynamoDBReadOnlyAccess
Events:
GetHtml:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
ListTable:
Type: AWS::Serverless::SimpleTable # DynamoDB Table
…
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS::Serverless::Function
Handler: index.js
Runtime: nodejs6.10
CodeUri: 's3://my-code-bucket/my-function.zip'
Description: Creates thumbnails of uploaded images
MemorySize: 1024
Timeout: 15
Policies:
- AWSLambdaExecute # Managed Policy
- Version: '2012-10-17' # Policy Document
Statement:
- …
Environment:
Variables:
TABLE_NAME: my-table
Events:
PhotoUpload:
Type: S3
Properties:
Bucket: my-photo-bucket
Tags:
AppNameTag: ThumbnailApp
AWS::Serverless::Function
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS::Serverless::API
Properties:
StageName: prod
DefinitionUri: swagger.yml
AWS::Serverless::API
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS::Serverless::SimpleTable
Properties:
PrimaryKey:
Name: id
Type: String
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
AWS::Serverless::SimpleTable
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• M W
D C a
S , , F
• / FA
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• G d b c ea
LfD J R E CIg
P
• N T
•
• ,
•
•
•
•
• . A
•
version: 0.1
environment_variables:
plaintext:
"INPUT_FILE": "saml.yaml"
"S3_BUCKET": ""
phases:
install:
commands:
- npm install
pre_build:
commands:
- eslint *.js
build:
commands:
- npm test
post_build:
commands:
- aws cloudformation package
--template $INPUT_FILE --s3-bucket
$S3_BUCKET --output-template post-saml.yaml
artifacts:
type: zip
files:
- post-saml.yaml
- beta.json
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
•
• A
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
-
•
• ) b FC TpL E
A d i I m LV S
SC e
• W hn ) E S
( mF NPW SC e
• - o cFa
l
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• b c i
• . . / / U MH
• / / U j
• / /U j
• V e CU L V EdH a
• / /. .
Mg F
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• c L ah Xhf -5 5 GA7F BAPe i
• F
• mT M
• ) CBA AF 5 57 B 5 B F
• V obp d -5 5 GA7F BAe ( Wk
• ( BG 5F7 (GEFB F 7E l -5 5 GA7F BA
obp nPe R
• 5I gc -5 5 GA7F BAe 57
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
1 .
• E E
•
•
• C
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
.2
•
• L gU SE
• A C ,
ei D
• MlWa c
• d
• T S P h E
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
. )(
• K p 17 97M Qg i e y
• e Qg i eM ar o n (
• b g Qt
• K QK , S
• K QK , )g Q ugP
• K r d 0 :B B 7 , s ugP
• K r K r d 646 , 2:BB7 :5:C: C : 9
RL ugP
• 1 Cr m n 6D C : C: r e
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
4 .
• / F 9 o Lu p
• S N t b T 3 U r fLu p
• 5 5L 9 9E9 : 9 m u u cn
• s 5 5 , C o ) 3 e a PO r o 5 5
, C l ) ) v ) ) oe a
• RT 9 9E9 : 9 o x i 2e 30 r U
d
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
. . 5
• L E N P
• RV E SC D I N P
•
• N V L G P
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 2 2 t 2 b wL
• 2 vG y L , L A T
• 2 t vG H , C ,
i R A 2 t b u
• , C , N i sL
• . 2 C i
• , r EI p g u vG oS l
• mF en L ac L 2
2 t g P i dH L ac
i dH
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• i u N M s v s
• s ec l a l f s
• Wm S n m t yw Wm s
• pm mc o g xh g n m v
v s
• Tu N M 7F H s
• . LD
• F
• .NLDH LL
• HM DL
• Wm s b
d 5R 4 ? ANH MD H H P E
r 3D
5R 4 ? ANH MD H H P E CR,
:C HE R N!
BD H NF
4 ? 2NH MD H 6 RP ANH
/ ? H? : F M MM C ?
vk
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
• 세션 후, 설문에 참여해 주시면 행사 후 소정의 선물을 드립니다.
• #AWSDevDay 해시 태그로 의견을 남겨주세요!

AWS Lambda 자세히 살펴보기 (조성열, AWS 시스템 엔지니어) :: AWS DevDay2018

  • 1.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. ,
  • 2.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • • • • • CA P M PS B • D L T
  • 3.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 4.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. / A a d fe A n b L Wm iaSa n a
  • 5.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. 1 9 6 961 D 요청 소요 시간 41 , 7 60 6 2 .- , 2 .- f ei • ,() 2 % ( d *% % l bk% ( bk a0 (. * :94 • (). 2 % ( d * % % l bk% ) bk a0 (( * :94 1 9 PD L I D LI AAI ML MI 6 D PDMC I MC : MD 8 M B AI C 1 9 BDI % D B I MC D D B % IA M LM , MC 9 D 3I DM MS 5 MC M 6 I L IM M MC 9 D 3I DM M% I PD DBD MI D 9 D 3 DM ( Wg f U% 5 a f U ch 961 0 ,
  • 6.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. I EC A PCMB . 9 5 G t d yv 1 JIC M km i d 0 IN M B p tc 0 I w e o tc km l r I L 8 MBI , 0 1 0I # 2I ab (), / MI , / un m ht () / o nS s jgm .83 vT W b jgm W W
  • 7.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. - - / - . . - - / / / /
  • 8.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 9.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. F F / E C H CA C ( CH EA , A H C H CAA C)A .C C ) H 0 CC N R P OLTM ( CH EA SW ACE H (0 N R U
  • 10.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. 11 .
  • 11.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. . 2
  • 12.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 13.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. & & Source Build Test Production Continuous Integration Continuous Delivery Continuous Deployment • A , F e • A CI A • , CI • E f a • E f a - , , , c a R d
  • 14.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. . . ( . ) C ?
  • 15.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • • IOPFW / J N • Y S C T IOP L A I • IOP Y M W
  • 16.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. { "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "2 Tier Web Application Template", "Parameters" : { "KeyName": { "Type": "AWS::EC2::KeyPair::KeyName" }, "InstanceType" : { "Type" : "String", "Default" : "t2.small” } }, "Resources" : { "ALBSecurityGroup" : { "Type" : "AWS::EC2::SecurityGroup", "Properties" : { "GroupDescription" : "ALB Security Group", "SecurityGroupIngress" : [ {"IpProtocol" : "tcp", "FromPort" : "80", "ToPort" : "80", "CidrIp" : "0.0.0.0/0"} ], "VpcId" : { "Fn::ImportValue" : { "Fn::Sub": "${VPCStackName}-VPCID" } } } }, … }
  • 17.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. ( ) • ) GP S I A • ) M , ) ( B C LF C T E M D
  • 18.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • M D L F • L CcI / • • • L K R e A • M L S a e C T R F • W de A
  • 19.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • ( A C cG M F • / A C A , C C • - C C • ( C • C A A • AC Sa F • C ( A C L S N , L S IT bd • C P • I C cV ) /A Ob Template Alpha Gamma Prod Lambda Function AWS Resources
  • 20.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. AWSTemplateFormatVersion: 2010-09-09 Transform: AWS::Serverless-2016-10-31 # CloudFormation Template SAM Template Resources: GetHtmlFunction: Type: AWS::Serverless::Function # Lambda Function Properties: CodeUri: s3://sam-demo-bucket/my_function.zip Handler: index.gethtml Runtime: nodejs4.3 Policies: AmazonDynamoDBReadOnlyAccess Events: GetHtml: Type: Api Properties: Path: /{proxy+} Method: ANY ListTable: Type: AWS::Serverless::SimpleTable # DynamoDB Table …
  • 21.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. AWS::Serverless::Function Handler: index.js Runtime: nodejs6.10 CodeUri: 's3://my-code-bucket/my-function.zip' Description: Creates thumbnails of uploaded images MemorySize: 1024 Timeout: 15 Policies: - AWSLambdaExecute # Managed Policy - Version: '2012-10-17' # Policy Document Statement: - … Environment: Variables: TABLE_NAME: my-table Events: PhotoUpload: Type: S3 Properties: Bucket: my-photo-bucket Tags: AppNameTag: ThumbnailApp AWS::Serverless::Function
  • 22.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. AWS::Serverless::API Properties: StageName: prod DefinitionUri: swagger.yml AWS::Serverless::API
  • 23.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. AWS::Serverless::SimpleTable Properties: PrimaryKey: Name: id Type: String ProvisionedThroughput: ReadCapacityUnits: 5 WriteCapacityUnits: 5 AWS::Serverless::SimpleTable
  • 24.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 25.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • M W D C a S , , F • / FA
  • 26.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • G d b c ea LfD J R E CIg P • N T • • , • • • • • . A • version: 0.1 environment_variables: plaintext: "INPUT_FILE": "saml.yaml" "S3_BUCKET": "" phases: install: commands: - npm install pre_build: commands: - eslint *.js build: commands: - npm test post_build: commands: - aws cloudformation package --template $INPUT_FILE --s3-bucket $S3_BUCKET --output-template post-saml.yaml artifacts: type: zip files: - post-saml.yaml - beta.json
  • 27.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • • A
  • 28.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 29.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 30.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 31.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 32.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. - • • ) b FC TpL E A d i I m LV S SC e • W hn ) E S ( mF NPW SC e • - o cFa l
  • 33.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • b c i • . . / / U MH • / / U j • / /U j • V e CU L V EdH a • / /. . Mg F
  • 34.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • c L ah Xhf -5 5 GA7F BAPe i • F • mT M • ) CBA AF 5 57 B 5 B F • V obp d -5 5 GA7F BAe ( Wk • ( BG 5F7 (GEFB F 7E l -5 5 GA7F BA obp nPe R • 5I gc -5 5 GA7F BAe 57
  • 35.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 36.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. 1 . • E E • • • C
  • 37.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. .2 • • L gU SE • A C , ei D • MlWa c • d • T S P h E
  • 38.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. . )( • K p 17 97M Qg i e y • e Qg i eM ar o n ( • b g Qt • K QK , S • K QK , )g Q ugP • K r d 0 :B B 7 , s ugP • K r K r d 646 , 2:BB7 :5:C: C : 9 RL ugP • 1 Cr m n 6D C : C: r e
  • 39.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. 4 . • / F 9 o Lu p • S N t b T 3 U r fLu p • 5 5L 9 9E9 : 9 m u u cn • s 5 5 , C o ) 3 e a PO r o 5 5 , C l ) ) v ) ) oe a • RT 9 9E9 : 9 o x i 2e 30 r U d
  • 40.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. . . 5 • L E N P • RV E SC D I N P • • N V L G P
  • 41.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • 2 2 t 2 b wL • 2 vG y L , L A T • 2 t vG H , C , i R A 2 t b u • , C , N i sL • . 2 C i • , r EI p g u vG oS l • mF en L ac L 2 2 t g P i dH L ac i dH
  • 42.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 43.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • i u N M s v s • s ec l a l f s • Wm S n m t yw Wm s • pm mc o g xh g n m v v s • Tu N M 7F H s • . LD • F • .NLDH LL • HM DL • Wm s b d 5R 4 ? ANH MD H H P E r 3D 5R 4 ? ANH MD H H P E CR, :C HE R N! BD H NF 4 ? 2NH MD H 6 RP ANH / ? H? : F M MM C ? vk
  • 44.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved.
  • 45.
    © 2018, AmazonWeb Services, Inc. or its Affiliates. All rights reserved. • 세션 후, 설문에 참여해 주시면 행사 후 소정의 선물을 드립니다. • #AWSDevDay 해시 태그로 의견을 남겨주세요!