Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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: {
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"])
}
};
};
/**