3
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 1 year has passed since last update.

AWSの機能一覧

Last updated at Posted at 2020-11-06

はじめに

AWSの機能を私が調べた範囲で紹介します。

正確には「機能」でなく「サービス」と呼ぶのですが、本記事ではECSのサービスと混同するのを避けるために「機能」と呼びます。

CloudFormation

インフラのコード化
https://aws.amazon.com/jp/cloudformation/

プロパティ 説明
logRetentionInDays 指定したロググループにログイベントを保持する日数(d)
1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653を指定できる

Stacks

複数のリソースをグループ化したもの
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/stacks.html

リソースとスタックはN:1であり、1つのリソースが複数のスタックには所属できない
ECSのクラスター、サービス、タスクはそれぞれ1つのリソース

CDK

「Cloud Development Kit」の略
インフラ構成ツール
https://aws.amazon.com/jp/cdk/
https://github.com/aws/aws-cdk

TypeScriptなどの言語でCloudFormationのYAMLファイルを生成できる
今はPythonで書いている人が圧倒的に多いらしい
しかし、async/awaitやNode.jsが使えるので、TSを選ぶのはあり
https://qiita.com/is_ryo/items/8e6787a457a84447461a

2019/07/12にv1.0.0がリリースされた
https://github.com/aws/aws-cdk/releases

マルチクラウドでないならTerraformよりいいとのこと

Serverless Frameworkも含めた3つの比較
https://blog.codecentric.de/en/2019/09/aws-cdk-versus-terraform-and-serverless-framework/

Context

AZやAMI IDの値のキャッシュ
基本的にはAWSが自動で生成する
https://docs.aws.amazon.com/cdk/latest/guide/context.html

cdkを実行すると、自動的に cdk.context.json が生成される
キャッシュが悪さをしている場合、手動で削除するといい

AWS SAM

「Serverless Application Model」の略
AWSでサーバーレスアプリケーションを構築するために使うOSSのフレームワーク
CDKがリリースされたので、現在は使わないとのこと
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/serverless_app.html

Step Functions

ワークフローの構築
https://aws.amazon.com/jp/step-functions/
https://docs.aws.amazon.com/ja_jp/step-functions/latest/dg/welcome.html

複数のLambda関数を簡単に繋げられる
https://dev.classmethod.jp/cloud/aws/first-aws-step-functions/

Lambda

サーバーレスで関数を実行
https://aws.amazon.com/jp/lambda/
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/welcome.html
https://techblog.nhn-techorus.com/archives/14795

GoogleでいうGoogle Cloud Functions
https://qiita.com/bump_of_kiharu/items/355a73412445c5ff59a0

Lambdaがサポートする言語
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/lambda-runtimes.html

GoのAWS Lambda関数ハンドラー
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/go-programming-model-handler-types.html

プロパティ 説明
timeout タイムアウト(s)
0 s〜900 s(15m)で指定できる
memorySize メモリサイズ(MB)
128 MB〜3,008 MBまで、64 MBごとに指定できる
CPUのスペックもメモリサイズに比例して割り当てられる

レイヤー

一度に5つのレイヤーを使える
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/configuration-layers.html

Lambda Proxy Integration(Lambda プロキシ統合)

https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html
https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html
https://qiita.com/_mogaming/items/2bd83204e212e35b2c6c

mogamingさん曰く

このGatewayに対するリクエストの情報(HTTPメソッド、クエリストリング、パス、ソースIPなど)を勝手にまとめてくれて、Lambdaに渡してくれる」機能

Lightsail

かんたんにLAMP環境やWordPressサーバーを立てられる
https://aws.amazon.com/jp/lightsail/

EC2より柔軟性が低い分、安く使える
https://dev.classmethod.jp/cloud/aws/try-lightsail-wordpress/

CodeCommit

プライベートのリポジトリ
https://docs.aws.amazon.com/ja_jp/codecommit/latest/userguide/welcome.html

CodePipeline

CI/CDサービス
従量課金制
https://aws.amazon.com/jp/codepipeline/
https://docs.aws.amazon.com/ja_jp/codepipeline/latest/userguide/welcome.html

CodeBuild

ビルドサービス
従量課金制
https://aws.amazon.com/jp/codebuild/

CodeDeploy

デプロイサービス
従量課金制
https://aws.amazon.com/jp/codedeploy/

ECS

「Elastic Container Service」の略
Dockerコンテナの管理
https://docs.aws.amazon.com/ja_jp/AmazonECS/latest/developerguide/Welcome.html

用語 説明
タスク TBD
サービス タスクをコーディネートする
クラスター タスクやサービスの論理グループ

https://docs.aws.amazon.com/ja_jp/AmazonECS/latest/developerguide/task_definitions.html
https://docs.aws.amazon.com/ja_jp/AmazonECS/latest/developerguide/ecs_services.html
https://docs.aws.amazon.com/ja_jp/AmazonECS/latest/developerguide/clusters.html

クラスターの意味は機能ごとに異なる

ECR

「Elastic Container Registry」の略
Dockerイメージの管理
簡単にいうとプライベートなDockerhub
https://aws.amazon.com/jp/ecr/

Fargate

サーバーやクラスターを管理せずにコンテナを実行する
ECSに対応している
https://aws.amazon.com/jp/fargate/

EC2の管理なしにコンテナを実行できるため、運用コストを抑えられる
今まではEC2より割高だったが、安くなったとのこと
https://dev.classmethod.jp/cloud/aws/compare-fees-for-fargat-and-ec2-2019-1/

EKS

「Elastic Kubernetes Service」の略
https://aws.amazon.com/jp/eks/

RDS

「Relational Database Service」の略
RDBサービス
https://aws.amazon.com/jp/rds/

Amazon Aurora

MySQLおよびPostgreSQLと互換性のあるクラウド向けのRDB
https://aws.amazon.com/jp/rds/aurora/

Redshift

データウェアハウス
https://aws.amazon.com/jp/redshift/
https://docs.aws.amazon.com/ja_jp/redshift/latest/mgmt/welcome.html

DynamoDB

NoSQLのDB
https://aws.amazon.com/jp/dynamodb/

Amazon ElastiCache

RedisまたはMemcached互換のインメモリデータストアをシームレスにセットアップ、実行、およびスケーリングする
https://aws.amazon.com/jp/elasticache/

SSM

「Systems Manager」の略
インフラの表示と制御?
https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/what-is-systems-manager.html

Parameter Store

パラメータの管理
https://docs.aws.amazon.com/ja_jp/systems-manager/latest/userguide/systems-manager-parameter-store.html

IAM

「Identity and Access Management」の略
アクセス管理
どの機能を使うのにも必要なので、使えるようになるべき
デフォルトは何も権限がなく、必要に応じて付与する
https://aws.amazon.com/jp/iam/

追加料金なしで使える

ポリシー

ポリシーの種類

ポリシーの種類 説明
AWS管理ポリシー
(AWS Managed Policy)
AWSがデフォルトで提供しているスタンドアローンのポリシー
基本的なポリシーが揃っている
カスタマー管理ポリシー
(Customer Managed Policy)
ユーザーが定義するスタンドアローンのポリシー
インラインポリシー
(Inline Policy)
プリンシパルエンティティ(ユーザー、グループ、ロール)に紐付くポリシー
プリンシパルエンティティを削除すると一緒に消える

まずAWS管理ポリシーを使い、細かい制限をインラインポリシーで行うと安全なロールを作成できます。
上記の説明は間違っていないですが、基本的には再利用性の高い管理ポリシーを使うべきです。
指定したプリンシパルエンティティ以外には絶対に紐付けたくない場合のみ、インラインポリシーを使います。

管理ポリシーを使うかインラインポリシーを使うかは、メソッドをpublicにするかprivateにするかと同じ判断基準でよさそうです。
明らかに他で使う場合以外は、インラインポリシーを使います。

ポリシーの構成要素

ポリシーの構成要素 必須 説明
effect 許可 or 拒否
actions どのサービスの何の動作か
conditions ポリシーの実行条件
resources 対象リソース
ワイルドカードが使える

https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/reference_policies_elements_condition.html
https://docs.aws.amazon.com/ja_jp/IAM/latest/UserGuide/reference_policies_elements_resource.html

例:現在の環境のECSリソースの更新を許可する(リソースIDは「{環境名}-{リソース名}」)
statements: [
  new iam.PolicyStatement({
    effect: iam.Effect.ALLOW,
    actions: [
      'ecs:UpdateService',
    ],
    resources: [
      `arn:aws:ecs:::${config.get('{環境名を保持しているパス}')}-*`,
    ],
  }),
],

ARN

「AWS Resource Name」の略
AWSリソースを一意に識別する
https://docs.aws.amazon.com/ja_jp/general/latest/gr/aws-arns-and-namespaces.html

ARNの形式
arn:partition:service:region:account-id:resource-id
arn:partition:service:region:account-id:resource-type/resource-id
arn:partition:service:region:account-id:resource-type:resource-id

Cognito

ユーザー管理
https://aws.amazon.com/jp/cognito/

X-Ray

アプリの分析とデバッグ
https://aws.amazon.com/jp/xray/

CloudWatch

モニタリングサービス
https://aws.amazon.com/jp/cloudwatch/
https://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html

CloudWatch Events

cron式で特定の時間にアクションを実行するトリガーを作成できる
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html

AWSにおけるcron式の書き方
https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html
https://qiita.com/da-sugi/items/ef3bb45a8a99a4acacb1

CloudWatch Logs

ログ監視
https://docs.aws.amazon.com/ja_jp/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html

ELB

「Elastic Load Balancing」の略
https://aws.amazon.com/jp/elasticloadbalancing/

ALB

「Application Load Balancer」の略
Webアプリで使うことが多い

NLB

「Network Load Balancer」の略
Webアプリ以外で使うことが多い
ALBと比べて高速

GLB

「Gateway Load Balancer」の略

CLB

「Classic Load Balancer」の略

AppSync

GraphQL管理サービス
https://aws.amazon.com/jp/appsync/
https://qiita.com/nakazax/items/209e4fac5fa42db6e8c8
https://tech.gunosy.io/entry/gunosy-sports2

Amplify

「アンプリファイ」と読む
セキュアでスケーラブルなモバイルアプリとWevアプリを構築するための開発プラットフォーム
https://aws.amazon.com/jp/amplify/

VTL

「Apache Velocity Template Language」の略
AppSyncのサーバーサイドの実装に使うプログラミング言語
https://docs.aws.amazon.com/ja_jp/appsync/latest/devguide/resolver-mapping-template-reference-programming-guide.html

SNS

「Simple Notification Service」の略
https://aws.amazon.com/jp/sns/

Amazon Corretto

無料のOpenJDKディストリビューション
Java SE標準と互換性がある
Linux、Windows、macOSなどの一般的なOSで、Javaアプリケーションを開発・実行できる
パフォーマンスの向上とセキュリティの修正などの長期サポートを用意している
https://aws.amazon.com/jp/corretto/

Cloud9

クラウドIDE
https://aws.amazon.com/jp/cloud9/

Device Farm

デバイスファーム
https://aws.amazon.com/jp/device-farm/

Amazon Linux 2

Amazon Linuxの次世代バージョン
AWSが提供するLinuxサーバーOS
https://aws.amazon.com/jp/amazon-linux-2/

ACM

「AWS Certificate Manager」の略
証明書管理
AWSベースのWebサイトとアプリ用のパブリックSSL/TLS証明書の複雑な作成と管理を行う
https://docs.aws.amazon.com/ja_jp/acm/latest/userguide/acm-overview.html

CloudFront

CDN
https://aws.amazon.com/jp/cloudfront/

Route 53

DNS
可用性と拡張性に優れている
https://aws.amazon.com/jp/route53/

Amazon WorkSpaces

DaaS(Desktop as a Service)
WindowsまたはLinuxのデスクトップ
https://aws.amazon.com/jp/workspaces/?workspaces-blogs.sort-by=item.additionalFields.createdDate&workspaces-blogs.sort-order=desc

AWS VPN

「Virtual Private Network」の略
安全にネットワークへ接続する
https://aws.amazon.com/jp/vpn/

CodeGuru

2020/02/14現在、プレビュー
MLで自動コードレビュー
https://aws.amazon.com/jp/codeguru/

セミナー

AWS Summit Online

日本最大のAWSを学ぶイベント
2022/05/25〜2022/05/26
https://aws.amazon.com/jp/summits/japan/

Black Belt Online Seminar

無料のオンラインセミナー
日本語
Youtubeで動画がアップロードされている
スライドも公開されている
公開日が古い情報は注意
https://aws.amazon.com/jp/aws-jp-introduction/aws-jp-webinar-service-cut/

Innovate

期間限定のオンラインセミナー
2019/10/01〜2019/11/05
https://aws.amazon.com/jp/about-aws/events/aws-innovate/

メモ

healthy
ヘルスチェックOKの状態

全機能を学ぶのは無理なので、自分がしたいことに必要な機能に絞って学ぶのがいいとのこと

3
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
3
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?