serverless.ymlμ VPC μ μμμ λ€μκ³Ό κ°μ λ³μλ₯Ό μ¬μ©νλ κ²½μ° :
vpc :
securityGroupIds :
-$ { self : custom.prod_sg_a }
-$ { self : custom.prod_sg_b }
μλΈλ· ID :
-$ { self : custom.prod_subnet_a }
-$ { self : custom.prod_subnet_b }
μλ²λ¦¬μ€λ λ°°ν¬μ λ€μ μ€λ₯λ₯Ό λ°μμν΅λλ€.
μλ²λ¦¬μ€ : λ°°ν¬ μ€ν¨!
μλ²λ¦¬μ€ μ€λ₯ ---------------------------------------
An error occurred while provisioning your stack: LambdaFunction
- Value of property SecurityGroupIds must be of type
List of String.
λμμ λ°λ€ --------------------------------------------
λ¬Έμ : docs.serverless.com
λ²κ·Έ : github.com/serverless/serverless/issues
νκ²½ μ 보 -----------------------------
μ΄μ체μ : darwin
λ
Έλ λ²μ : 5.1.1
μλ²λ¦¬μ€ λ²μ : 1.6.1
λ³μ (μ€μ²© λ³μ ν¬ν¨)λ₯Ό μ¬μ©νμ¬ μλ‘ λ€λ₯Έ κ³μ λ° λ°λΌμ μλ‘ λ€λ₯Έ VPCμ λ°°ν¬λ₯Ό μ§μν μ μμ΄μΌν©λλ€.
λλ μ΄κ²μ μν΄ λ³μλ₯Ό μ¬μ©νκ³ μμ§λ§ 1.3κ³Ό ν¨κ» μ¬μ©νκ³ μμ΅λλ€. μ νν serverless.yml
νμΌμ΄ μμ΅λκΉ?
μλλ λ΄κ°μ΄ μμ μ μννλ λ°©λ²μ μμ λλ€. μμ λμμΌλ―λ‘ μ ννμ§ μμ μ μμ§λ§ μμμ μ μ 곡ν΄μΌν©λλ€.
custom:
vpc:
securityGroupIds: ${self:custom.SecurityGroupId}
subnetIds: ${self:custom.SubnetId}
SubnetId:
- TBA
SecurityGroupId:
- TBA
functions:
test:
handler: handlers/test.handler
vpc: ${self:custom.vpc}
κ°μ¬! κ·Έκ²μ μμμλ₯Ό μ°λ κ² κ°μμ΅λλ€. λ³μ λͺ©λ‘μ΄ μλ λͺ©λ‘μΌλ‘ λ³μλ₯Ό μ€μ ν΄μΌν©λλ€. μλλ©΄ κ·Έλ° κ². λμμ μ£Όμ μ κ°μ¬ν©λλ€!
νΈμ§ : DISREGARD-μ¨λΌμΈμμ μ΄λκ° μμμ΄ κ΅¬μ±μ 볡μ¬νμΌλ©° λμ λμ νμ΄νμ λΆμ¬μ μ€λ₯κ° λ°μνμ΅λλ€.
μ΄ κ°μ μ€λ₯κ° λ°μν©λλ€. 보μ κ·Έλ£Ήμ΄ νλλΏμ λλ€.
λλ λ λ€ μλνλ€
provider:
name: aws
runtime: nodejs6.10
vpc:
securityGroupIds:
β "sg-abcdefg1"
subnetIds:
β "subnet-abcdefg1"
β "subnet-abcdefg2"
κ³Ό
provider:
name: aws
runtime: nodejs6.10
vpc:
securityGroupIds: "sg-abcdefg1"
subnetIds:
β "subnet-abcdefg1"
β "subnet-abcdefg2"
μ΄κ²μ λ¨μ§ yaml μΌμ λκΉ?
νΈμ§ : DISREGARD-μ¨λΌμΈμμ μ΄λκ° μμμ΄ κ΅¬μ±μ 볡μ¬νμΌλ©° λμ λμ νμ΄νμ λΆμ¬μ μ€λ₯κ° λ°μνμ΅λλ€.
κ°μ₯ μ μ©ν λκΈ
νΈμ§ : DISREGARD-μ¨λΌμΈμμ μ΄λκ° μμμ΄ κ΅¬μ±μ 볡μ¬νμΌλ©° λμ λμ νμ΄νμ λΆμ¬μ μ€λ₯κ° λ°μνμ΅λλ€.
μ΄ κ°μ μ€λ₯κ° λ°μν©λλ€. 보μ κ·Έλ£Ήμ΄ νλλΏμ λλ€.
λλ λ λ€ μλνλ€
κ³Ό
μ΄κ²μ λ¨μ§ yaml μΌμ λκΉ?
νΈμ§ : DISREGARD-μ¨λΌμΈμμ μ΄λκ° μμμ΄ κ΅¬μ±μ 볡μ¬νμΌλ©° λμ λμ νμ΄νμ λΆμ¬μ μ€λ₯κ° λ°μνμ΅λλ€.