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
<!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
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
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
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
provider: | |
name: aws | |
iamManagedPolicies: | |
- arn:aws:iam::aws:policy/AmazonSNSFullAccess | |
- arn:aws:iam::aws:policy/AmazonTextractFullAccess | |
- arn:aws:iam::aws:policy/AmazonS3FullAccess | |
runtime: ${self:custom.lambdaRunTime} | |
versionFunctions: false | |
region: us-east-1 |
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
plugins: | |
- serverless-pseudo-parameters |
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
layers: | |
boto3Layer: | |
path: lib/boto3 | |
name: boto3-layer | |
description: Boto3 layer for stage | |
compatibleRuntimes: | |
- ${self:custom.lambdaRunTime} |