AWS Lambda(七)---用CloudTrail

本文介绍了如何使用AWS CloudTrail监控CloudFormation组件的异常,并通过CloudFormation配置发送邮件通知。步骤包括创建S3 bucket,新建CloudTrail,配置CloudWatch,创建VPC,以及部署CloudFormation模板。
摘要由CSDN通过智能技术生成

本文任务:

利用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.csdn.net/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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值