728x90
반응형

카테고리 없음

[Google Cloud Functions] Error: Forbidden Your client does not have permission 에러 해결 방법

Google Cloud Function을 배포하고 HTTP Trigger로 지정된 URL로 확인을 하려고 할 때 Error: Forbidden Your client does not have permission 에러가 발생하는 경우가 생깁니다. 이 경우에는 아래의 명령어로 함수에 모든유저들에게 접근권한을 부여함으로써 해결할 수 있습니다. gcloud alpha functions add-iam-policy-binding {function name} --region=asia-northeast1 --member=allUsers --role=roles/cloudfunctions.invoker

2020.03.13 게시됨

개발/Google Cloud Platform

[Google Cloud Functions] Cannot deploy functions; The engine "node" is incompatible with this module. Expected version ">=10" 에러 해결방법

Node v10.16.3 GCF을 배포하기 위해서 gcloud deploygcloud functions deploy function1 --trigger-http --runtime nodejs10 --memory 1024MB --region asia-northeast1 명령어를 실행했는데 아래와 같은 에러가 발생 (gcloud.functions.deploy) OperationError: code=3, message=Build failed: {"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "`yarn_install` had stderr output:\nwarning package.json: No license field\nFATAL ERROR..

2020.03.13 게시됨

개발/Google Cloud Platform

Serverless Framework를 활용해서 Google Cloud Functions 배포하는 방법

Serverless Framework를 활용해서 Google Cloud Functions에 배포하려면 우선 Serverless Framework CLI를 설치해야 됩니다. macOS & Linux curl -o- -L https://slss.io/install | bash Windows choco install serverless YARN or NPM yarn global add serverless // or npm install -g serverless serverless --version을 통해서 Serverless가 정상적으로 설치되었는지 확인합니다. 아래와 같이 Serverless Framework의 정보가 나오면 정상적으로 설치된 것입니다. 자 Serverless를 설치했으니 CLI를 활용해서 ..

2020.03.02 게시됨

개발/Google Cloud Platform

GCF(Google Cloud Functions) CORS 해결방법

GCF CORS 해결방법은 함수의 response Access-Control-Allow-Origin을 설정하는 것입니다. 해결방법 1. exports.exFunc = async (req, res) => { res.set("Access-Control-Allow-Origin", "*"); // CORS settings if (req.method === "OPTIONS") { // Send response to OPTIONS requests res.set("Access-Control-Allow-Methods", ""); res.set("Access-Control-Allow-Headers", "Content-Type"); res.set("Access-Control-Max-Age", "3600"); res.sta..

2020.02.28 게시됨

728x90
반응형