Skip to content

Commit

Permalink
fix backend, frontend, db and ddb migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Beici Liang committed May 30, 2023
1 parent 5626f39 commit 4af7126
Show file tree
Hide file tree
Showing 66 changed files with 1,152 additions and 852 deletions.
4 changes: 4 additions & 0 deletions aws/cfn/machine-user/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[deploy]
bucket = 'cfn-artifacts-beici'
region = 'us-east-1'
stack_name = 'CrdMachineUser'
25 changes: 25 additions & 0 deletions aws/cfn/machine-user/template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
AWSTemplateFormatVersion: "2010-09-09"
Resources:
CruddurMachineUser:
Type: "AWS::IAM::User"
Properties:
UserName: "cruddur_machine_user"
DynamoDBFullAccessPolicy:
Type: "AWS::IAM::Policy"
Properties:
PolicyName: "DynamoDBFullAccessPolicy"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- dynamodb:PutItem
- dynamodb:GetItem
- dynamodb:Scan
- dynamodb:Query
- dynamodb:UpdateItem
- dynamodb:DeleteItem
- dynamodb:BatchWriteItem
Resource: "*"
Users:
- !Ref CruddurMachineUser
3 changes: 2 additions & 1 deletion aws/cfn/service/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ stack_name = 'CrdSrvBackendFlask'

[parameters]
EnvFrontendUrl = 'https://beici-demo.xyz'
EnvBackendUrl = 'https://api.beici-demo.xyz'
EnvBackendUrl = 'https://api.beici-demo.xyz'
DDBMessageTable = 'CrdDdb-DynamoDBTable-OY28TEYFKEV3'
5 changes: 5 additions & 0 deletions aws/cfn/service/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ Parameters:
SecretsOtelExporterOltpHeaders:
Type: String
Default: "arn:aws:ssm:us-east-1:366939446291:parameter/cruddur/backend-flask/OTEL_EXPORTER_OTLP_HEADERS"
DDBMessageTable:
Type: String
Default: cruddur-messages

Resources:
FargateService:
Expand Down Expand Up @@ -161,6 +164,8 @@ Resources:
awslogs-region: !Ref AWS::Region
awslogs-stream-prefix: !Ref ServiceName
Environment:
- Name: DDB_MESSAGE_TABLE
Value: !Ref DDBMessageTable
- Name: "OTEL_SERVICE_NAME"
Value: !Ref EnvOtelServiceName
- Name: "OTEL_EXPORTER_OTLP_ENDPOINT"
Expand Down
Loading

0 comments on commit 4af7126

Please sign in to comment.