LoginSignup
2
1

More than 5 years have passed since last update.

Cloud Functions でソースコードサイズの割当の追加はできないよっていうお話

Last updated at Posted at 2018-12-12

本編

事の発端
cloud functions で "Your proposed upload is larger than the maximum object size specified in your Policy Document." と言われた。

なんでもかんでも同じプロジェクト内に functions のコードを追加し続けたら以下のエラーで怒られた。

Status: [400:<?xml version='1.0' encoding='UTF-8'?><Error><Code>EntityTooLarge</Code><Message>Your proposed upload is larger than the maximum object size specified in your Policy Document.</Message><Details>Content-length exceeds upper bound on range</Details></Error>]

きれいにプロジェクトを分割して保守性を高めなければなあ。
と思いつつもソースコードに割り当てられているストレージのサイズを挙げて応急処置。

Image from Gyazo

と思いきや…

コードのサイズ的な項目がない…????

ドキュメントを参照してみると…

割り当て  |  Cloud Functions のドキュメント  |  Google Cloud

Image from Gyazo

できない!!!

おとなしく function ごとに分割してプロジェクトを作り直します。

追記

pipenv を導入した際に venvディレクトリが生成されたのを完全に忘れていた。(そらサイズも大きいわ。)

.gcloudignoreファイルに以下を追記して解決された。
(ついでに 動作確認で使っていた jupyter のファイルたちもアップロードしないように変更)

.gcloudignore
...

# jupyter notebooks
*.ipynb

# pipenv
venv

...
2
1
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
2
1