Skip to content

Commit

Permalink
Update to version v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
YikaiHu committed Sep 13, 2022
1 parent f67668f commit c61f765
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 46,306 deletions.
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# aws-exports
aws-exports.json


*.js
!jest.config.js
*.d.ts
node_modules
Expand All @@ -27,7 +27,4 @@ regional-s3-assets
.cache
.build

Config
*.js

!source/portal/src/assets/config
Config
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [1.0.0] - 2022-01-04
### Added
- All files, initial version
- All files, initial version

## [1.0.1] - 2022-09-07
### Fixed
- Upgrade lambda runtime to python v3.7.0
- Fix the list limit of secrets
27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
# Issue !!! 🚨
Related issue: https://github.com/awslabs/data-transfer-hub/issues/89

If you encounter the following error message when creating the S3 plugin:

`is not authorized to perform: logs:DescribeMetricFilters on resource: arn:aws:logs:xxxxxx.`,

this is because of a recent change on AWS service policy, please follow below actions to fix:

1. Go to AWS [IAM role console](https://us-east-1.console.aws.amazon.com/iamv2/home#/roles), and search for `APICfnWorkflowCreateTaskCfnFnServi`, and choose the role which name is `DataTransferHub-APICfnWorkflowCreateTaskCfnFnServixxx-xxxxxxxxxxx`.

2. Click the icon on the right side of `APICfnWorkflowTaskFnPolicy`, and click **Edit**.

<img width="1386" alt="image" src="https://user-images.githubusercontent.com/34271744/177914005-5060f6c4-8f5f-4b52-911e-69798362ce7f.png">

3. Choose the JSON tab, add the policy `"logs:DescribeMetricFilters"` at line 152, don't forget to add a comma at the end of line 151. And click **Review Policy**.
<img width="1229" alt="image" src="https://user-images.githubusercontent.com/34271744/177914236-5f1a8637-bce1-4a99-ac30-de806c149e8e.png">

4. Click **Save Changes**

5. Create a new S3 transfer task.

This issue will be fixed in the next release.


# Data Transfer Hub

_Note_: If you have already deployed this solution, refer to the [User Guide](docs/UserManual.md).
Expand Down Expand Up @@ -132,4 +107,4 @@ of Account A.
## More Resources

* [How to customize this solution and build your own distributable?](./docs/build-your-own-distributable.md)
* [Deploy this solution via AWS CDK](./docs/deploy-via-cdk.md)
* [Deploy this solution via AWS CDK](./docs/deploy-via-cdk.md)
4 changes: 3 additions & 1 deletion source/constructs/lambda/api/api-sm-param.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ const handler = async function (event: any, context?: Context) {
const sm = new AWS.SecretsManager({apiVersion: '2017-10-17'});
let result: Array<Parameter> = [];

const params = {};
const params = {
MaxResults: 100,
};

await sm.listSecrets(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
Expand Down
11 changes: 11 additions & 0 deletions source/constructs/lib/cfn-step-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export class CloudFormationStateMachine extends cdk.Construct {
"SNS:DeleteTopic",
"SNS:Subscribe",
"SNS:Unsubscribe",
"SNS:TagResource"
],
resources: [`arn:${cdk.Aws.PARTITION}:sns:${cdk.Aws.REGION}:${cdk.Aws.ACCOUNT_ID}:DTH*`]
}),
Expand Down Expand Up @@ -218,6 +219,7 @@ export class CloudFormationStateMachine extends cdk.Construct {
"logs:GetLogEvents",
"logs:PutMetricFilter",
"logs:DeleteMetricFilter",
"logs:DescribeMetricFilters"
],
resources: [`*`]
}),
Expand All @@ -238,6 +240,14 @@ export class CloudFormationStateMachine extends cdk.Construct {
`*`
]
}),
new iam.PolicyStatement({
actions: [
"tag:TagResources"
],
resources: [
`*`
]
}),
new iam.PolicyStatement({
actions: [
"iam:CreateInstanceProfile",
Expand Down Expand Up @@ -278,6 +288,7 @@ export class CloudFormationStateMachine extends cdk.Construct {
"lambda:UpdateFunctionConfiguration",
"lambda:UpdateFunctionCode",
"lambda:PublishVersion",
"lambda:TagResource",
"lambda:Get*",
"lambda:List*",
],
Expand Down
46 changes: 23 additions & 23 deletions source/constructs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@
"cdk": "cdk"
},
"devDependencies": {
"@aws-cdk/assert": "1.125.0",
"@types/aws-lambda": "^8.10.83",
"@types/jest": "^27.0.2",
"@aws-cdk/assert": "1.157.0",
"@types/aws-lambda": "8.10.83",
"@types/jest": "27.0.2",
"@types/node": "16.10.3",
"@types/uuid": "^8.3.1",
"aws-cdk": "^1.124.0",
"aws-sdk": "^2.1003.0",
"aws-sdk-mock": "^5.4.0",
"jest": "^27.2.4",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"@types/uuid": "8.3.1",
"aws-cdk": "1.157.0",
"aws-sdk": "2.1003.0",
"aws-sdk-mock": "5.4.0",
"jest": "27.2.4",
"ts-jest": "27.0.5",
"ts-node": "10.2.1",
"typescript": "~3.9.10",
"uuid": "^8.3.2"
"uuid": "8.3.2"
},
"dependencies": {
"@aws-cdk/aws-apigateway": "1.125.0",
"@aws-cdk/aws-appsync": "1.125.0",
"@aws-cdk/aws-cognito": "1.125.0",
"@aws-cdk/aws-dynamodb": "1.125.0",
"@aws-cdk/aws-lambda": "1.125.0",
"@aws-cdk/aws-s3-deployment": "1.125.0",
"@aws-cdk/aws-stepfunctions": "1.125.0",
"@aws-cdk/aws-stepfunctions-tasks": "1.125.0",
"@aws-cdk/core": "1.125.0",
"@aws-solutions-constructs/aws-cloudfront-s3": "1.125.0",
"@aws-solutions-constructs/core": "1.125.0",
"source-map-support": "^0.5.20"
"@aws-cdk/aws-apigateway": "1.157.0",
"@aws-cdk/aws-appsync": "1.157.0",
"@aws-cdk/aws-cognito": "1.157.0",
"@aws-cdk/aws-dynamodb": "1.157.0",
"@aws-cdk/aws-lambda": "1.157.0",
"@aws-cdk/aws-s3-deployment": "1.157.0",
"@aws-cdk/aws-stepfunctions": "1.157.0",
"@aws-cdk/aws-stepfunctions-tasks": "1.157.0",
"@aws-cdk/core": "1.157.0",
"@aws-solutions-constructs/aws-cloudfront-s3": "1.157.0",
"@aws-solutions-constructs/core": "1.157.0",
"source-map-support": "0.5.20"
}
}
2 changes: 1 addition & 1 deletion source/custom-resource/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const https = require('https');
const url = require('url');
const moment = require('moment');
const S3Helper = require('./lib/s3-helper.js');
const UsageMetrics = require('./lib/aws-usage-metrics');
const UsageMetrics = require('./lib/usage-metrics');
const uuidv4 = require('uuid/v4');

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "aws-usage-metrics",
"name": "usage-metrics",
"version": "0.0.1",
"description": "Usage metrics is an auxiliary class to capture metrics pertinent for feedback on the solution",
"author": {
Expand Down
Loading

0 comments on commit c61f765

Please sign in to comment.