0
0

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 3 years have passed since last update.

AWS SAMではまった箇所備忘録

Last updated at Posted at 2020-07-30

Serverlessはなんとなくわかるけど、CloudFormationはほぼ触ったことない人間がSAM始めてみました。
はまりどころ多すぎてメモを残しておきます。※随時更新

API

  • ステージ:勝手に自動でProdとStageができる → バグらしい

Layer

AWS::Serverless::LayerVersion
AWS::Lambda::LayerVersion
の2種類があるらしく、AWS::Lambda::LayerVersionlayerの方でlayer単体でスタック作成しようとしたらエラーに...
cloudformationかsamの違いなのか?
→ AWS::Serverless::LayerVersionのドキュメントにて、重要な注意点: 発売以来 置換ポリシーの更新 のリソース属性 AWS CloudFormation、 AWS::Lambda::LayerVersion (推奨)は、 AWS::Serverless::LayerVersion.とのこと

どちらかというとCloudFormation

  • BucketName:大文字入力しててはまった...小文字だけにしましょう!
  • Role:ResourceはAWS::IAM::Policyに別書きしないといけない
  • 擬似パラメータ:使いたいときは、""の前に!Sub入れる
  • 複数要素を設定できる属性には - を付けないとエラーになる、逆に1つしか設定できない属性に - 付けるとエラーになる
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?