Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for expiration of records in DynamoDB #47

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ _Note:_ You would have to create 2 buckets, one with prefix 'my-bucket-name' and
* Now build the distributable:
```
chmod +x ./build-s3-dist.sh \n
./build-s3-dist.sh $DIST_OUTPUT_BUCKET $TEMPLATE_OUTPUT_BUCKET \n
./build-s3-dist.sh $DIST_OUTPUT_BUCKET limit-monitor v1.0.0 $TEMPLATE_OUTPUT_BUCKET \n
```

* Deploy the distributable to an Amazon S3 bucket in your account. _Note:_ you must have the AWS Command Line Interface installed.

```
aws s3 cp ./dist/ s3://my-bucket-name/limit-monitor/latest/ --recursive --exclude "*" --include "*.template" --acl bucket-owner-full-control --profile aws-cred-profile-name \n
aws s3 cp ./dist/ s3://my-bucket-name-<aws_region>/limit-monitor/latest/ --recursive --exclude "*" --include "*.zip" --acl bucket-owner-full-control --profile aws-cred-profile-name \n
aws s3 cp ./global-s3-assets/ s3://my-bucket-name/limit-monitor/latest/ --recursive --exclude "*" --include "*.template" --acl bucket-owner-full-control --profile aws-cred-profile-name \n
aws s3 cp ./regional-s3-assets/ s3://my-bucket-name-<aws_region>/limit-monitor/latest/ --recursive --exclude "*" --include "*.zip" --acl bucket-owner-full-control --profile aws-cred-profile-name \n
```

* Get the link of the limit-monitor.template uploaded to your Amazon S3 bucket.
Expand Down Expand Up @@ -65,17 +65,17 @@ The AWS Limit Monitor Solution project consists of 4 microservices which is depl
|-[ service module unit tests ]
|-index.js [main module]
|-logger.js [logger module]
|-slack-notify.js [slack messaging module]
|-slack-notify.js [slack messaging module]
|-index.js [ injection point for microservice ]
|-package.json
|-tarefresh/ [ microservice for refreshing TA checks ]
|-lib/
|-[ service module unit tests ]
|-index.js [main module]
|-logger.js [logger module]
|-ta-refresh.js [TA checks module]
|-ta-refresh.js [TA checks module]
|-index.js [ injection point for microservice ]
|-package.json
|-package.json
```
***

Expand All @@ -101,7 +101,7 @@ The AWS Limit Monitor Solution project consists of 4 microservices which is depl

```bash
* Added Trusted Advisor service limit checks for Route53 and DynamoDB
* Fixed mapping between DynamoDB attributes and TA keys
* Fixed mapping between DynamoDB attributes and TA keys
* Fixed incorrect attribute mappings
```

Expand Down
2 changes: 1 addition & 1 deletion source/services/limitreport/lib/limit-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class limitreport {
CurrentUsage: ta_mssg.detail['check-item-detail']['Current Usage'],
LimitAmount: ta_mssg.detail['check-item-detail']['Limit Amount'],
Status: ta_mssg.detail['status'],
ExpiryTime: new Date().getTime() + 15 * 24 * 3600 * 1000, //1️⃣5️⃣ days
ExpiryTime: parseInt((new Date().getTime() + 15 * 24 * 3600 * 1000) / 1000), //1️⃣5️⃣ days
},
};
LOGGER.log('DEBUG', `DDB put item: ${JSON.stringify(params)}`);
Expand Down