1
1

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.

SAMってどういうサービス?

Posted at

勉強前イメージ

サーバ立てずともなんやかんや出来るサーバレスなんとかのイメージ
それしか知らん....

調査

AWS SAM ってなに?

AWS SAM とはAWS Serverless Application Modelの略(めっちゃサーバレス書いてるやん...
AWSのサービス(lamda, APIgateway等々)を使って、サーバレスのアプリケーションを構築できるフレームワーク
リソースをひとまとめに管理出来て、作成・更新・削除 が出来ます。

AWS SAMを使うメリット

  • CloudFormationの拡張である

AWS SAMはCloudFormationの拡張であるため
CloudFormationのでデプロイ機能が使える
SAMのテンプレートでCloudFormationが使える関数やリソースを使用することが出来ます。

  • 単一のデプロイ構成

関連するコンポーネントやリソースの整理が楽になって、単一のスタック上で操作できるようになる

AWS SAM を使うには?

AWS CLI をインストールしておく

詳細は こちら から

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
sudo python get-pip.py
sudo pip install awscli

# バージョン確認
aws --version
aws-cli/1.18.128 Python/2.7.5 Linux/3.10.0-1127.19.1.el7.x86_64 botocore/1.17.51

aws configの設定を行う

aws configure
==========
AWS Access Key ID [None]: XXXXXXXXXXXXX
AWS Secret Access Key [None] : XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Default region name [None] : xxxxxxxx
Default output format [None]: json
==========
AWS Access Key ID : アクセスキー
AWS Secret Access Key : シークレットキー
Default region name : デフォルトのリージョン
Default output format : デフォルトのフォーマット

s3にバケットを作成

SAMで必要なファイルはs3に置くらしい

IAMの設定をしておく

以下のIAM Roleの設定しておけば行けるらしい

  • s3
  • Lambda
  • APIGateway

勉強後イメージ

そもそもSAMってなに? → サーバなしに色々出来るやつなのね くらいまでは分かった。
実際は触ってみないとイメージつかめないかも?
AWSのチュートリアルとかやってみよう

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?