cfn/text-cm-update.yaml [1:57]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AWSTemplateFormatVersion: 2010-09-09
Description: CloudFormation template for creating blog resources.
Parameters:
  EmailSubscriber:
    Type: String
    Description: SNS Email subscriber
Resources:
  BLOGROLE:
    Type: 'AWS::IAM::Role'
    Properties:
      Description: IAM Role
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - ec2.amazonaws.com
                - lambda.amazonaws.com
                - s3.amazonaws.com
            Action:
              - 'sts:AssumeRole'
      RoleName: blogrole10
      # I am using Managed policy, this can be further restricted per API usage
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/AmazonS3FullAccess'
        - 'arn:aws:iam::aws:policy/AmazonSQSFullAccess'
        - 'arn:aws:iam::aws:policy/AmazonSNSFullAccess'
        - 'arn:aws:iam::aws:policy/AWSLambdaFullAccess'
        - 'arn:aws:iam::aws:policy/AmazonTextractFullAccess'
        - 'arn:aws:iam::aws:policy/ComprehendMedicalFullAccess'
        - 'arn:aws:iam::aws:policy/CloudWatchFullAccess'
        - 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
  ALLEQUEUE:
    Type: 'AWS::SQS::Queue'
    Properties:
      QueueName: blog-queue10
      VisibilityTimeout: 240
  VALIDATEQUEUE:
    Type: 'AWS::SQS::Queue'
    Properties:
      QueueName: valid-blog-queue10
      VisibilityTimeout: 240
  INVALIDATEQUEUE:
    Type: 'AWS::SQS::Queue'
    Properties:
      QueueName: invalid-blog-queue10
  BLOGSNS:
    Type: 'AWS::SNS::Topic'
    Properties:
      DisplayName: blogsns10
      Subscription:
        - Endpoint: !Ref EmailSubscriber
          Protocol: email
      TopicName: blogtopic10
  RESULTBUCKET:
    Type: 'AWS::S3::Bucket'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cfn/text-cm.yaml [1:57]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AWSTemplateFormatVersion: 2010-09-09
Description: CloudFormation template for creating blog resources.
Parameters:
  EmailSubscriber:
    Type: String
    Description: SNS Email subscriber
Resources:
  BLOGROLE:
    Type: 'AWS::IAM::Role'
    Properties:
      Description: IAM Role
      AssumeRolePolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - ec2.amazonaws.com
                - lambda.amazonaws.com
                - s3.amazonaws.com
            Action:
              - 'sts:AssumeRole'
      RoleName: blogrole10
      # I am using Managed policy, this can be further access restricted to API level
      ManagedPolicyArns:
        - 'arn:aws:iam::aws:policy/AmazonS3FullAccess'
        - 'arn:aws:iam::aws:policy/AmazonSQSFullAccess'
        - 'arn:aws:iam::aws:policy/AmazonSNSFullAccess'
        - 'arn:aws:iam::aws:policy/AWSLambdaFullAccess'
        - 'arn:aws:iam::aws:policy/AmazonTextractFullAccess'
        - 'arn:aws:iam::aws:policy/ComprehendMedicalFullAccess'
        - 'arn:aws:iam::aws:policy/CloudWatchFullAccess'
        - 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
  ALLEQUEUE:
    Type: 'AWS::SQS::Queue'
    Properties:
      QueueName: blog-queue10
      VisibilityTimeout: 240
  VALIDATEQUEUE:
    Type: 'AWS::SQS::Queue'
    Properties:
      QueueName: valid-blog-queue10
      VisibilityTimeout: 240
  INVALIDATEQUEUE:
    Type: 'AWS::SQS::Queue'
    Properties:
      QueueName: invalid-blog-queue10
  BLOGSNS:
    Type: 'AWS::SNS::Topic'
    Properties:
      DisplayName: blogsns10
      Subscription:
        - Endpoint: !Ref EmailSubscriber
          Protocol: email
      TopicName: blogtopic10
  RESULTBUCKET:
    Type: 'AWS::S3::Bucket'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



