Skip to content

Commit

Permalink
Merge branch 'develop' v0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrahan committed Jun 10, 2022
2 parents 5121f94 + 204b2de commit 07f3cd9
Show file tree
Hide file tree
Showing 16 changed files with 103 additions and 8 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.4] - 2022-06-10
### Fixed
- Use sigv4 for S3 presignedURLS
- New stack output with list of role ARNS thta need access KMS key (if any) used to encrypt S3 InputBucket, OutputBucket, or BulkUploadBucket

## [0.2.3] - 2022-06-09
### Fixed
- Simplifies workflow by using new Transcribe API to specify Custom Vocabulary and Vocabulary Filter at the same time as using Language ID.
Expand Down Expand Up @@ -49,7 +54,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Initial release

[Unreleased]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/compare/v0.2.3...develop
[Unreleased]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/compare/v0.2.4...develop
[0.2.4]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/releases/tag/v0.2.4
[0.2.3]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/releases/tag/v0.2.3
[0.2.2]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/releases/tag/v0.2.2
[0.2.1]: https://github.com/aws-samples/amazon-transcribe-post-call-analytics/releases/tag/v0.2.1
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.3
0.2.4
8 changes: 7 additions & 1 deletion pca-main-nokendra.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: "2010-09-09"

Description: Amazon Transcribe Post Call Analytics - PCA (v0.2.3) (uksb-1sn29lk73)
Description: Amazon Transcribe Post Call Analytics - PCA (v0.2.4) (uksb-1sn29lk73)

Parameters:

Expand Down Expand Up @@ -612,3 +612,9 @@ Outputs:
Description: PCA admin user
Value: !Ref AdminUsername

RolesForKMSKey:
Description: When using KMS key to encrypt S3 input/output buckets, KMS key must grant access to these roles.
Value: !Join
- ', '
- - !Sub '${PCAUI.Outputs.RolesForKMSKey}'
- !Sub '${PCAServer.Outputs.RolesForKMSKey}'
9 changes: 8 additions & 1 deletion pca-main.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: "2010-09-09"

Description: Amazon Transcribe Post Call Analytics - PCA (v0.2.3) (uksb-1sn29lk73)
Description: Amazon Transcribe Post Call Analytics - PCA (v0.2.4) (uksb-1sn29lk73)

Parameters:

Expand Down Expand Up @@ -758,3 +758,10 @@ Outputs:
Description: PCA admin user
Value: !Ref AdminUsername

RolesForKMSKey:
Description: When using KMS key to encrypt S3 input/output buckets, KMS key must grant access to these roles.
Value: !Join
- ', '
- - !Sub '${PCAUI.Outputs.RolesForKMSKey}'
- !Sub '${PCAServer.Outputs.RolesForKMSKey}'

7 changes: 7 additions & 0 deletions pca-server/cfn/lib/bulk.template
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,10 @@ Resources:
- CloudWatchLogsLogGroup:
LogGroupArn: !GetAtt LogGroup.Arn
RoleArn: !GetAtt Role.Arn

Outputs:

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '"${BulkMoveFiles.Arn}"'
7 changes: 7 additions & 0 deletions pca-server/cfn/lib/copy-samples.template
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,10 @@ Resources:
Properties:
ServiceToken: !GetAtt CopySamplesFunction.Arn
SamplesVersion: 0.2

Outputs:

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '"${CopySamplesRole.Arn}"'
10 changes: 10 additions & 0 deletions pca-server/cfn/lib/pca.template
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,13 @@ Resources:
- CloudWatchLogsLogGroup:
LogGroupArn: !GetAtt LogGroup.Arn
RoleArn: !GetAtt Role.Arn

Outputs:

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '"${TranscribeLambdaRole.Arn}"'
- !Sub '"${TranscribeRole.Arn}"'
- !Sub '"${SFProcessTurnRole.Arn}"'

7 changes: 7 additions & 0 deletions pca-server/cfn/lib/trigger.template
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,10 @@ Resources:
- dynamodb:DeleteItem
- dynamodb:GetItem
Resource: !Sub arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/${TableName}

Outputs:

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '"${FileDropTriggerRole.Arn}"'
13 changes: 12 additions & 1 deletion pca-server/cfn/pca-server.template
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,15 @@ Resources:
GlueDatabase:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: lib/glue-database.template
TemplateURL: lib/glue-database.template

Outputs:

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '${CopySamples.Outputs.RolesForKMSKey}'
- !Sub '${Trigger.Outputs.RolesForKMSKey}'
- !Sub '${PCA.Outputs.RolesForKMSKey}'
- !Sub '${BulkImport.Outputs.RolesForKMSKey}'

6 changes: 4 additions & 2 deletions pca-server/src/copy-samples/copy-samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ def lambda_handler(event, context):
supportfiles_bucket = os.environ['SUPPORTFILES_BUCKET_NAME']
input_bucket = os.environ['INPUT_BUCKET_NAME']
prefix = os.environ['INPUT_BUCKET_RAW_AUDIO']
if event['RequestType'] != 'Delete':
requestType = event.get('RequestType')
if requestType != 'Delete':
try:
s3Client = boto3.client('s3')
# sample entities
Expand All @@ -33,4 +34,5 @@ def lambda_handler(event, context):
print(e)
responseData["Error"] = f"Exception thrown: {e}"
status = cfnresponse.FAILED
cfnresponse.send(event, context, status, responseData)
if requestType:
cfnresponse.send(event, context, status, responseData)
6 changes: 6 additions & 0 deletions pca-ui/cfn/lib/api.template
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,9 @@ Resources:
Outputs:
Uri:
Value: !Sub https://${Api}.execute-api.${AWS::Region}.amazonaws.com/Prod

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '"${GetFunctionRole.Arn}"'
- !Sub '"${SwapFunctionRole.Arn}"'
7 changes: 7 additions & 0 deletions pca-ui/cfn/lib/deploy.template
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,10 @@ Resources:
AuthClientId: !Ref AuthClientId
ApiUri: !Ref ApiUri
Region: !Ref AWS::Region

Outputs:

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '"${Role.Arn}"'
6 changes: 6 additions & 0 deletions pca-ui/cfn/lib/indexer.template
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,9 @@ Resources:
Outputs:
TableName:
Value: !Ref Table

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '"${IndexFunctionRole.Arn}"'
- !Sub '"${ConfigureDataBucketRole.Arn}"'
5 changes: 5 additions & 0 deletions pca-ui/cfn/lib/web.template
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,8 @@ Outputs:

Bucket:
Value: !Ref WebBucket

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '"${EdgeFunctionRole.Arn}"'
8 changes: 8 additions & 0 deletions pca-ui/cfn/pca-ui.template
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,11 @@ Outputs:

WebUri:
Value: !GetAtt Web.Outputs.Uri

RolesForKMSKey:
Value: !Join
- ', '
- - !Sub '${Api.Outputs.RolesForKMSKey}'
- !Sub '${Indexer.Outputs.RolesForKMSKey}'
- !Sub '${Deploy.Outputs.RolesForKMSKey}'
- !Sub '${Web.Outputs.RolesForKMSKey}'
2 changes: 1 addition & 1 deletion pca-ui/src/lambda/get.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const AWS = require("aws-sdk");
const s3 = new AWS.S3();
const s3 = new AWS.S3({signatureVersion: 'v4'});

const dataBucket = process.env.DataBucket;
const audioBucket = process.env.AudioBucket;
Expand Down

0 comments on commit 07f3cd9

Please sign in to comment.