How to use the cloudform.Refs function in cloudform

To help you get started, we’ve selected a few cloudform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-amplify / amplify-cli / packages / graphql-dynamodb-transformer / lib / resources.js View on Github external
ResourceFactory.prototype.makeIAMRole = function (tableId) {
        return new iam_1.default.Role({
            RoleName: cloudform_1.Fn.Join('-', [cloudform_1.Refs.StackName, tableId, 'role']),
            AssumeRolePolicyDocument: {
                Version: '2012-10-17',
                Statement: [
                    {
                        Effect: 'Allow',
                        Principal: {
                            Service: 'appsync.amazonaws.com'
                        },
                        Action: 'sts:AssumeRole'
                    }
                ]
            },
            Policies: [
                new iam_1.default.Role.Policy({
                    PolicyName: 'DynamoDBAccess',
                    PolicyDocument: {
github aws-amplify / amplify-cli / packages / amplify-graphql-elasticsearch-transformer / lib / resources.js View on Github external
ResourceFactory.prototype.makeElasticsearchIAMRoleOutput = function () {
        return {
            Description: "The IAM Role used to execute queries against the ElasticSearch index.",
            Value: cloudform_1.Fn.GetAtt(amplify_graphql_transformer_common_1.ResourceConstants.RESOURCES.ElasticSearchAccessIAMRoleLogicalID, 'Arn'),
            Export: {
                Name: cloudform_1.Fn.Join(':', [cloudform_1.Refs.StackName, "ElasticSearchAccessIAMRoleArn"])
            }
        };
    };
    /**