Cloudformation Substitution Example

, , 3 Comments

AWSTemplateFormatVersion: 2010-09-09
Description: Create DynamoDB table for Monit Application
Parameters:
  Environment:
    Default: dev
    Description: Leveraged for environment tagging.
    Type: String
    AllowedValues:
      - dev
      - tst
      - qa
      - stg
      - prd
Resources:
  MaintPolicy:
    Type: 'AWS::IAM::Policy'
    Description: Allow maintenance from onprem Jenkins instance
    Properties:
      Groups:
        - "AP4JenkinsAccess"
      PolicyName: !Sub 'monit-${Environment}-access'
      PolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Action:
              - 'dynamodb:*'
            Resource:
              - 'Fn::Sub': >-
                 arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/monit-${Environment}/
              - 'Fn::Sub': >-
                 arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/monit-${Environment}/*
Outputs:
  myStacksRegion:
    Value: !Ref 'AWS::Region'
  myAccountId:
    Value: !Ref 'AWS::AccountId'
 

3 Responses

  1. Melissa Kish

    July 30, 2020 10:47 pm

    YOU NEED POTENTIAL CUSTOMERS THAT BUY FROM YOU ?

    I’m talking about a better promotion method than all that exists on the market right now, even better than email marketing.
    Just like you received this message from me, this is exactly how you can promote your business or product.

    Do you want more details or do you want to receive a TEST ?
    Contact me => ventfara@mail.com

  2. David Brookins

    August 3, 2020 4:40 pm

    YOU NEED POTENTIAL CUSTOMERS THAT BUY FROM YOU ?

    I’m talking about a better promotion method than all that exists on the market right now, even better than email marketing.
    Just like you received this message from me, this is exactly how you can promote your business or product.

    Do you want more details or do you want to receive a TEST ?
    CHECK HERE=> https://bit.ly/Good_Promotion

Leave a Reply