10
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Google Cloud Functionsについて初心者視点で調べてみた

10
Posted at

公式URL
https://cloud.google.com/functions/?hl=ja

ざっくりどんなものか

他に覚える必要があるもの

クイックスタートによると
https://cloud.google.com/functions/docs/quickstart

以下が必要
  • Google Cloud Platform (言わずもがな)
  • Google Cloud SDK
    • ローカル上で関数を作成したり、デプロイしたりするものらしい
    • 取り合えず簡単に試してみるなら不要だった
  • Google Cloud Storage (このストレージ上に保存されるので理解必要)

取り合えず動かせたところまでメモ

  1. Google Cloud Platformにアクセス
  2. 新規プロジェクト作成
  3. Google Cloud Storage をプロジェクトに追加
    4. バケットを作成
    4. 無料枠が良いならUSリージョンで
  4. Cloud Functions をプロジェクトに追加
  5. 関数を作成
    5. トリガー: HTTPトリガー
    6. ソースコード: インラインエディタ(デフォルトのコードのまま)
    7. ステージバケット: 3で作成したバケット指定
  6. デプロイ
  7. トリガ用の指定されたURLにてアクセス(index.jsで指定したrequest bodyメッセージを送信)
  8. 無事レスポンスが返る

今後の課題

  • ローカルでのエミュレート
  • レポジトリからソースコードをアップロードする方法検討
  • 攻撃対策
10
13
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?