Serverless: VPC 섀정은 λ³€μˆ˜λ‘œ ν• λ‹Ή ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

에 λ§Œλ“  2017λ…„ 02μ›” 10일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: serverless/serverless

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에 배포λ₯Ό 지원할 수 μžˆμ–΄μ•Όν•©λ‹ˆλ‹€.

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

νŽΈμ§‘ : 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-μ˜¨λΌμΈμ—μ„œ μ–΄λ”˜κ°€ μ—μ„œμ΄ ꡬ성을 λ³΅μ‚¬ν–ˆμœΌλ©° λŒ€μ‹œ λŒ€μ‹  ν•˜μ΄ν”ˆμ„ λΆ™μ—¬μ„œ 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€.

λͺ¨λ“  3 λŒ“κΈ€

λ‚˜λŠ” 이것을 μœ„ν•΄ λ³€μˆ˜λ₯Ό μ‚¬μš©ν•˜κ³  μžˆμ§€λ§Œ 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-μ˜¨λΌμΈμ—μ„œ μ–΄λ”˜κ°€ μ—μ„œμ΄ ꡬ성을 λ³΅μ‚¬ν–ˆμœΌλ©° λŒ€μ‹œ λŒ€μ‹  ν•˜μ΄ν”ˆμ„ λΆ™μ—¬μ„œ 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰