Serverless νλ μμν¬λ₯Ό ν΅ν΄ CF μ€νμ λ°°ν¬νκ³ μΆμμ§λ§ μμΈκ° λ°μνμ΅λλ€. κ·Έλμ aws-cliλ₯Ό ν΅ν΄ CF ꡬμ±μ κ²μ¦νκ³ ValidationErrorλ‘ μλ΅ν©λλ€.
Resources:
CognitoUserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolName: test-pool
CognitoUserPoolClient:
Type: AWS::Cognito::UserPoolClient
Properties:
ClientName: test-client
ExplicitAuthFlows:
- ADMIN_NO_SRP_AUTH
GenerateSecret: false
UserPoolId:
Ref: CognitoUserPool
aws cloudformation validate-template --template-body file://test-template.yml
md5-0884b744ef7ebb7d442c0f51b32b4a9f
An error occurred (ValidationError) when calling the ValidateTemplate operation: Template format error: Unrecognized resource types: [AWS::Cognito::UserPool, AWS::Cognito::UserPoolClient]
CF ꡬμ±μ΄ μ¬λ°λ₯΄κ³ μ΄μ μ»΄ν¨ν°μ λ°°ν¬ν μ μμλ€κ³ νμ νκΈ° λλ¬Έμ μ΄μνμ΅λλ€. λλ κ·Έκ²μ΄ μλ‘μ΄ 1.11.113 λ²μ μμ λ²κ·Έκ° λ μ μλ€κ³ μΈμμ μ΄μ μ»΄ν¨ν°μμ μλνκ³ 1.11.84μμ 맀λ ₯μ²λΌ μλνμ΅λλ€. κ·Έλ¬λ 1.11.113μ μ΄μ 1.11.84λ‘ λ€μ μ€μΉνλ©΄ μ€λ₯ λ©μμ§κ° λ¨μ μμ΅λλ€. μ λ°, λ΄κ° λ μλͺ»νκ³ μλμ§ λ§ν΄ μ€ μ μμ΅λκΉ? κ°μ¬ν©λλ€.
ν₯λ―Έλ‘κ²λ λλ μ΄κ²μ 볡μ ν μ μμ΅λλ€. μ£Όμ΄μ§ ν
νλ¦Ώμ 1.11.113
μλμμ μ μλν©λλ€. ν΅νμ --debug
λ₯Ό μΆκ°νκ³ μ¬κΈ°μ λ‘κ·Έλ₯Ό κ²μνλ©΄ μ§ν μν©μ λ μ μ μ μμ΅λλ€.
μΌλ°μ μΌλ‘ CLI λ²μ μ μλΉμ€μμ μλ΅μ λ°κΈ° λλ¬Έμ μ΄μ μν₯μ μ£Όμ΄μλ μ λ©λλ€. ν νλ¦Ώμ 보λ΄κ³ λ°μ μλ΅μ μΈμνκΈ°λ§ νλ©΄ λ©λλ€. CLI λ²μ μ΄μΈμ λ νΈμΆ κ°μ λ€λ₯Έ κ²μ΄ μμ΅λκΉ?
κΈμ, λλ κ·Έκ²μ μμ λμ΅λλ€. AWS_DEFAULT_REGION=us-west-1
νμΌλ©° Amazonμ ν΄λΉ μ§μμμ Cognitoλ₯Ό μ§μνμ§ μμ΅λλ€. us-east-1
νλ©΄ μλν©λλ€. μ΄ λμμ λ λ²μ λͺ¨λμμ λμΌνλ©° μ΄μ μμ€ν
μμ λ€λ₯Έ μμμ΄ λ°μνμ΅λλ€. λμμ£Όμ
μ κ°μ¬ν©λλ€!
λΉμ μ΄ κ·Έκ²μ μμ λκΈ° λλ¬Έμ κΈ°μ©λλ€!
κ°μ₯ μ μ©ν λκΈ
κΈμ, λλ κ·Έκ²μ μμ λμ΅λλ€.
AWS_DEFAULT_REGION=us-west-1
νμΌλ©° Amazonμ ν΄λΉ μ§μμμ Cognitoλ₯Ό μ§μνμ§ μμ΅λλ€.us-east-1
νλ©΄ μλν©λλ€. μ΄ λμμ λ λ²μ λͺ¨λμμ λμΌνλ©° μ΄μ μμ€ν μμ λ€λ₯Έ μμμ΄ λ°μνμ΅λλ€. λμμ£Όμ μ κ°μ¬ν©λλ€!