Score:1

How to apply default policies to cloudformation or terraform in aws?

uz flag

With terraform or cloudformation, we can apply individual permissions while creating a policy.

But how to select default predefined policies like AWSRDSReadyOnlyAccess, like these to the terraform template

Score:1
gp flag
Tim

Using the ManagedPolicyArns property. Here's how you do it using CloudFormation

DmsCloudwatchServiceRole:
    Type: AWS::IAM::Role
    Properties:
        RoleName: dms-cloudwatch-logs-role
        Description: "Role to allow DMS to write to Cloudwatch Logs. Role name must not be changed as DMS requires this exact role name."
        AssumeRolePolicyDocument:
            Version: 2012-10-17
            Statement:
                -
                    Effect: Allow
                    Principal:
                        Service:
                            - dms.amazonaws.com
                    Action:
                        - sts:AssumeRole
        Path: /
        ManagedPolicyArns:
         - arn:aws:iam::aws:policy/service-role/AmazonDMSCloudWatchLogsRole

I'm not 100% sure this is the question you're asking, the question is a little imprecise.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.