Skip to content

Commit

Permalink
yml update
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodrigues committed Mar 9, 2021
1 parent 032afff commit a88233b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions amplify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ backend:
- export S3_BUCKET=$(aws resourcegroupstaggingapi get-resources --tag-filters Key=user:Application,Values="${PROJECT_NAME}" --resource-type-filters s3 --query 'ResourceTagMappingList[*].[ResourceARN]' --output text | grep -v deployment | awk -F':::' '{print $2}')
- export LAMBDA_ARN=$(aws ssm get-parameter --name /mri-sched/lambdathesaurusarn --query Parameter.Value --output text)
- export LAMBDA_NAME=$(echo $LAMBDA_ARN | awk -F':' '{print $7}')
- export S3INVOKE=$(aws lambda get-policy --function-name $LAMBDA_NAME | grep s3invoke | wc -l)
- if [ $S3INVOKE -eq 1 ]; then aws lambda remove-permission --function-name ${LAMBDA_NAME} --statement-id s3invoke; fi
- aws lambda add-permission --function-name ${LAMBDA_NAME} --principal s3.amazonaws.com --statement-id s3invoke --action "lambda:InvokeFunction" --source-arn arn:aws:s3:::${S3_BUCKET} --source-account ${ACCOUNTID}
- sed "s|%LambdaArn%|$LAMBDA_ARN|g" notification.json > notification.s3
- export RST=$(aws s3api get-bucket-notification-configuration --bucket $S3_BUCKET 2> out.txt)
- if [ -z "$RST" ]; then aws s3api put-bucket-notification-configuration --bucket $S3_BUCKET --notification-configuration file://notification.s3 --output text; fi
- aws s3api put-bucket-notification-configuration --bucket $S3_BUCKET --notification-configuration file://notification.s3 --output text
- aws s3 cp ./src/backend/csv/thesaurus_medical.ths s3://$S3_BUCKET/public/thesaurus_medical.ths

frontend:
Expand Down

0 comments on commit a88233b

Please sign in to comment.