This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
custom: | |
currentStage: ${opt:stage, self:provider.stage} | |
s3BucketName: textractbucket-#{AWS::AccountId}-${self:custom.currentStage} | |
snsTopicName: pdfExtractionDone-#{AWS::AccountId}-${self:custom.currentStage} | |
snsFullAccessRoleName: AwsSnsFullAccessRole-#{AWS::AccountId}-${self:custom.currentStage} | |
lambdaRunTime: python3.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: textract-ocr-service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import urllib.parse | |
import boto3 | |
import os | |
print('Loading function') | |
s3 = boto3.client('s3') | |
comprehend = boto3.client('comprehendmedical') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>MSN AWS App</title> | |
</head> | |
<body> | |
<script src="./script/jquery.min.js"></script> | |
<script src="./script/aws-sdk-2.487.0.min.js"></script> | |
<script src="./script/aws-cognito-sdk.min.js"></script> | |
<script src="./script/amazon-cognito-identity.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta name="google-signin-client_id" content="<CLIENT ID>"> | |
<title>Google Auth To AWS</title> | |
</head> | |
<body> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<script src="https://apis.google.com/js/platform.js" async defer></script> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.487.0.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<CORSConfiguration> | |
<CORSRule> | |
<AllowedOrigin>*</AllowedOrigin> | |
<AllowedMethod>PUT</AllowedMethod> | |
<AllowedMethod>POST</AllowedMethod> | |
<AllowedMethod>DELETE</AllowedMethod> | |
<AllowedMethod>GET</AllowedMethod> | |
<AllowedHeader>*</AllowedHeader> | |
</CORSRule> | |
</CORSConfiguration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta name="google-signin-client_id" content="<CLIENT ID>"> | |
<title>Google Auth To AWS</title> | |
</head> | |
<body> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<script src="https://apis.google.com/js/platform.js" async defer></script> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.487.0.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import boto3 | |
import os | |
import urllib.parse | |
print('Loading function') | |
s3 = boto3.client('s3') | |
# Amazon Textract client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import boto3 | |
import os | |
def getJobResults(jobId): | |
pages = [] | |
textract = boto3.client('textract') | |
response = textract.get_document_text_detection(JobId=jobId) |