Skip to content

Commit

Permalink
GH-54: Removed All Custom Resources
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyhchen committed Aug 4, 2021
1 parent 157d41a commit 4971435
Showing 1 changed file with 9 additions and 189 deletions.
198 changes: 9 additions & 189 deletions amplify/backend/api/rms/stacks/CustomResources.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,195 +79,9 @@
}
},
"Resources": {
"MainTable": {
"Type": "AWS::AppSync::DataSource",
"Properties": {
"ApiId": {
"Ref": "AppSyncApiId"
},
"Name": "MainTable",
"Type": "AMAZON_DYNAMODB",
"ServiceRoleArn": {
"Fn::GetAtt": [
"RootRole",
"Arn"
]
},
"DynamoDBConfig": {
"AwsRegion" : {
"Ref": "AWS::Region"
},
"TableName" : {
"Ref": "storagemainName"
}
}
}
},
"ItemsTable": {
"Type": "AWS::AppSync::DataSource",
"Properties": {
"ApiId": {
"Ref": "AppSyncApiId"
},
"Name": "ItemsTable",
"Type": "AMAZON_DYNAMODB",
"ServiceRoleArn": {
"Fn::GetAtt": [
"RootRole",
"Arn"
]
},
"DynamoDBConfig": {
"AwsRegion" : {
"Ref": "AWS::Region"
},
"TableName" : {
"Ref": "storageitemsName"
}
}
}
},
"BatchTable": {
"Type": "AWS::AppSync::DataSource",
"Properties": {
"ApiId": {
"Ref": "AppSyncApiId"
},
"Name": "BatchTable",
"Type": "AMAZON_DYNAMODB",
"ServiceRoleArn": {
"Fn::GetAtt": [
"RootRole",
"Arn"
]
},
"DynamoDBConfig": {
"AwsRegion" : {
"Ref": "AWS::Region"
},
"TableName" : {
"Ref": "storagebatchName"
}
}
}
},
"TagsTable": {
"Type": "AWS::AppSync::DataSource",
"Properties": {
"ApiId": {
"Ref": "AppSyncApiId"
},
"Name": "TagsTable",
"Type": "AMAZON_DYNAMODB",
"ServiceRoleArn": {
"Fn::GetAtt": [
"RootRole",
"Arn"
]
},
"DynamoDBConfig": {
"AwsRegion" : {
"Ref": "AWS::Region"
},
"TableName" : {
"Ref": "storagetagsName"
}
}
}
},
"HistoryTable": {
"Type": "AWS::AppSync::DataSource",
"Properties": {
"ApiId": {
"Ref": "AppSyncApiId"
},
"Name": "HistoryTable",
"Type": "AMAZON_DYNAMODB",
"ServiceRoleArn": {
"Fn::GetAtt": [
"RootRole",
"Arn"
]
},
"DynamoDBConfig": {
"AwsRegion" : {
"Ref": "AWS::Region"
},
"TableName" : {
"Ref": "storagehistoryName"
}
}
}
},
"RootRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"appsync.amazonaws.com"
]
},
"Action": [
"sts:AssumeRole"
]
}
]
},
"Path": "/",
"Policies": [
{
"PolicyName": "all-dynamodb-table",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"dynamodb:GetItem",
"dynamodb:BatchGetItem",
"dynamodb:Query",
"dynamodb:PutItem",
"dynamodb:UpdateItem",
"dynamodb:DeleteItem",
"dynamodb:BatchWriteItem",
"appsync:CreateDataSource",
"appsync:UpdateDataSource"
],
"Resource": {
"Fn::Sub": [
"arn:aws:dynamodb:${Region}:${Account}:table/*",
{
"Region": {
"Ref": "AWS::Region"
},
"Account": {
"Ref": "AWS::AccountId"
}
}
]
}
}
]
}
}
]
}
},
"RootInstanceProfile": {
"Type": "AWS::IAM::InstanceProfile",
"Properties": {
"Path": "/",
"Roles": [
{
"Ref": "RootRole"
}
]
}
"EmptyResource": {
"Type": "Custom::EmptyResource",
"Condition": "AlwaysFalse"
}
},
"Conditions": {
Expand All @@ -286,5 +100,11 @@
"AlwaysFalse": {
"Fn::Equals": ["true", "false"]
}
},
"Outputs": {
"EmptyOutput": {
"Description": "An empty output. You may delete this if you have at least one resource above.",
"Value": ""
}
}
}

0 comments on commit 4971435

Please sign in to comment.