本文任务:
利用cloud trail和cloud watch检测 cloudformation中配置的component的异常,然后cloudformation中配置发邮件通知给指定邮箱。
1. s3页面新建一个bucket
2. 新建cloudtrail
cloudtrail页面,新建cloudtrail,过程中配置如下:
然后选择步骤1中新建号的bucket:
在trails页面,看到新建号的trails。对着新建好的trail双击进入,往下翻,可以看到cloudwatch的配置部分:
在configure中,
点击continue,跳转到下面界面,然后点击下面的allow:
3. 创建VPC
VPC页面,create 一个新的default VPC
4. 部署CloudFormation Template
(1)新建cloudformation
cloudformation页面,新建stack,使用以下yaml代码,新建template。然后再用建好的template新建stack。操作过程有问题可参考https://blog.youkuaiyun.com/daiqinge/article/details/103320419
---
AWSTemplateFormatVersion: 2010-09-09
Description: |
Creates the resources necessary to create a rule to monitor and
auto-mitigate security group change events
Metadata:
License:
Description: |
Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CO