Skip to content

Commit 4ef16b6

Browse files
authored
Merge pull request #217 from awslabs/v1.1.1
v1.1.1 commit
2 parents f2442c8 + a433fcb commit 4ef16b6

File tree

78 files changed

+5301
-4032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+5301
-4032
lines changed

.github/stale.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitignore

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,16 @@
3737
# build
3838
source/backend/functions/lambda-layers/aws_sdk/python
3939
source/backend/functions/lambda-layers/cr_helper/python
40-
!source/backend/functions/lambda-layers/decorators/python/decorators.py
41-
!source/backend/functions/lambda-layers/boto_utils/python/boto_utils.py
42-
# source/backend/functions/lambda-layers/decorators/python/*
43-
# source/backend/functions/lambda-layers/boto_utils/python/*
40+
source/backend/functions/lambda-layers/decorators/python/*
41+
source/backend/functions/lambda-layers/boto_utils/python/*
4442
source/backend/functions/cleanup-bucket/package
43+
source/backend/functions/cost-parser/src/setting-up-athena-integration.md
4544

4645
local-deploy-perspective.sh
46+
47+
# codebuild local testing
48+
codebuild_build.sh
49+
source/backend/functions/cost-parser/test/local-deploy.sh
50+
source/backend/functions/cost-parser/test/local-invoke-read-s3.sh
51+
source/backend/functions/cost-parser/test/local-invoke-service-cost.sh
52+
source/backend/functions/cost-parser/test/local-invoke.sh

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,27 @@ All notable changes to this project are documented in this file.
55
Based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.1] - 2021-09-28
9+
10+
### Added
11+
12+
- Missing icons for MariaDB, Aurora, SQL-Server RDS types.
13+
- OpensearchMultiAz parameter to CloudFormation template to set Amazon OpenSearch Service up with a single instance.
14+
15+
### Changed
16+
17+
- Migrated from Lambda@Edge to CloudFront Functions to handle secure headers for web requests to the frontend.
18+
- References to Amazon Elasticsearch Service to Amazon OpenSearch Service
19+
20+
### Fixed
21+
22+
- Fixed a bug causing a blank screen when expanding nodes whilst filters are enabled - https://github.com/awslabs/aws-perspective/issues/201
23+
- Fixed a bug that meant the time period for cost report queries was not persisted - https://github.com/awslabs/aws-perspective/issues/200
24+
- Fixed a bug that could result in python files being incorrectly excluded - https://github.com/awslabs/aws-perspective/issues/64
25+
- A bug causing some resource types to throw an exception when clicking "Show more details"
26+
827
## [1.1.0] - 2021-08-26
28+
929
### Added
1030

1131
- Support for newer ECS task ARNs
@@ -49,4 +69,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4969

5070
## [1.0.0] - 2020-09-21
5171

52-
- Initial release
72+
- Initial release

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# AWS Perspective (v1.1.0)
1+
# AWS Perspective (v1.1.1)
22

33
AWS Perspective is a tool that quickly visualizes AWS Cloud workloads as architecture diagrams. You can use the solution to build, customize, and share detailed workload visualizations based on live data from AWS. This solution works by maintaining an inventory of the AWS resources across your accounts and Regions, mapping relationships between them, and displaying them in a web user interface (web UI).
44

5-
v1.1.0 brings a new feature that uses AWS Cost & Usage Reports (AWS CUR) to help you identify AWS resources that have incurred a cost. You can build architecture diagrams displaying this cost information and generate Cost Reports which graph the overall cost of your workload over a configurable time period. These reports can be exported in CSV format.
5+
v1.1.1 brings a new feature that uses AWS Cost & Usage Reports (AWS CUR) to help you identify AWS resources that have incurred a cost. You can build architecture diagrams displaying this cost information and generate Cost Reports which graph the overall cost of your workload over a configurable time period. These reports can be exported in CSV format.
66

77
The new release includes many UX improvements among them a Grouped Resources ** view which displays an inventory of your workloads. Resource type coverage has also been improved with Perspective now supporting your Amazon Redshift Clusters.
88

@@ -217,9 +217,10 @@ Parameters required by the template:
217217
* **OptOutOfSendingAnonymousUsageMetrics** - Yes/No depending on whether you are happy to send anonymous usage metrics back to AWS.
218218
* **CreateNeptuneReplica** - Yes/No depending on whether you want a read-replica created for Amazon Neptune. Note, that this will increase the cost of running the solution.
219219
* **NeptuneInstanceClass** - Select from a range of instance types that will be provisioned for the Amazon Neptune database. Note, the selection could increase the cost associated with running the solution.
220-
* **ElasticsearchInstanceType** - Select the instance type that will be provisioned for the Amazon ElasticSearch Domain.
220+
* **OpensearchInstanceType** - Select the instance type that will be provisioned for the Amazon ElasticSearch Domain.
221221
* **CreateAPIGatewayCloudWatchLogsRole** - If set to Yes, the solution creates a role and overwrites the existing APIGatewayCloudWatchLogsLogsRole property. Set to No if you already have an existing role set.
222222
* **AthenaWorkgroup** - The Workgroup that will be used to issue the Athena query when the Cost feature is enabled.
223+
* **OpensearchMultiAz** - Choose whether to create an Opensearch cluster that spans multiple Availability Zone. Choosing Yes improves resilience; however, increases the cost of this solution.
223224

224225
**Note** - You will need to deploy in the same account and region as the S3 bucket that the deployment artefacts are uploaded to.
225226

@@ -301,6 +302,7 @@ curl -X POST "https://${DRAWIO_API_URL}.execute-api.${AWS_REGION}.amazonaws.com/
301302
--data-raw '{"elements":{"nodes":[], "edges": []}}'
302303
```
303304

305+
304306
##### Response
305307

306308
You will receive a URL that when clicked will open up DrawIO in the browser and show your graph.
@@ -309,7 +311,17 @@ You will receive a URL that when clicked will open up DrawIO in the browser and
309311

310312
## Collecting Anonymous Operational Metrics
311313

312-
This solution collects anonymous operational metrics to help AWS improve the quality of features of the solution. For more information, including how to disable this capability, please see the [Implementation Guide](https://docs.aws.amazon.com/solutions/latest/aws-perspective/appendix-g-collection-of-operational-metrics.html).
314+
This solution collects anonymous operational metrics to help AWS improve the quality of features of the solution. For more information, including how to disable this capability, please see the [Implementation Guide](https://docs.aws.amazon.com/solutions/latest/aws-perspective/collection-of-operational-metrics.html).
315+
316+
## Acknowledgements
317+
318+
AWS Perspective is able to generate its architecture diagrams thanks to these libraries developed and maintained by the [Info Visualization Research Lab](https://www.cs.bilkent.edu.tr/~ivis/) over at Bilkent University:
319+
320+
* [cytoscape.js-fcose](https://github.com/iVis-at-Bilkent/cytoscape.js-fcose)
321+
* [cytoscape.js-grid-guide](https://github.com/iVis-at-Bilkent/cytoscape.js-grid-guide)
322+
* [cytoscape.js-context-menus](https://github.com/iVis-at-Bilkent/cytoscape.js-context-menus)
323+
* [cytoscape.js-expand-collapse](https://github.com/iVis-at-Bilkent/cytoscape.js-expand-collapse)
324+
313325

314326
Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
315327

deployment/build-s3-dist.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,22 @@ echo "[Rebuild] Layers"
124124
echo "------------------------------------------------------------------------------"
125125
cd $source_dir/backend/functions/lambda-layers
126126
for i in `ls -d */ | sed 's#/##'` ; do
127-
pip install -r $i/requirements.txt -t $i/python/
127+
mkdir $i/python
128+
[ -f "$i/$i.py" ] && cp $i/$i.py $i/python
129+
[ -f "$i/requirements.txt" ] && pip install -r $i/requirements.txt -t $i/python/
128130
cd $i
129131
zip -q -r9 ../$i.zip ./python
130132
cd ..
133+
rm -rf $i/python
131134
done
132135
cp ./*.zip $build_dist_dir/
133136

134137
echo "------------------------------------------------------------------------------"
135-
echo "[Rebuild] Secured Edge Lambda"
138+
echo "[Rebuild] HSTS CloudFront Function"
136139
echo "------------------------------------------------------------------------------"
137140
cd $source_dir/backend/functions/secured-edge
138-
mkdir dist && zip -q -r9 dist/create_regional_edge_lambda.zip create_regional_edge_lambda.py
139-
cp ./dist/create_regional_edge_lambda.zip $build_dist_dir/create_regional_edge_lambda.zip
141+
rm -rf dist && mkdir dist && cp cff-hsts.js dist/cff-hsts.js
142+
cp ./dist/cff-hsts.js $build_dist_dir/cff-hsts.js
140143

141144
echo "------------------------------------------------------------------------------"
142145
echo "[Rebuild] Cleanup Bucket Lambda"

deployment/perspective-setup.yaml

Lines changed: 51 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,20 @@ Parameters:
2828
AlreadyHaveConfigSetup:
2929
Type: String
3030
Default: 'No'
31-
Description: 'Is AWS Config set-up within this Account or Region?'
31+
Description: 'Is AWS Config set-up within this Region?'
3232
AllowedValues:
3333
- 'No'
3434
- 'Yes'
35-
ConstraintDescription: 'Please specify if this account has config set-up (Yes / No)'
36-
CreateElasticsearchServiceRole:
35+
ConstraintDescription: 'Please specify if this Region has AWS Config set-up (Yes / No)'
36+
CreateOpensearchServiceRole:
3737
Type: String
3838
Default: 'Yes'
39-
Description: 'Do you need an ElasticSearch Service Role to be created?
39+
Description: 'Do you need an OpenSearch Service Role to be created?
4040
You can check for a Role called AWSServiceRoleForAmazonElasticsearchService in your account. If it exists then you do NOT need one creating'
4141
AllowedValues:
4242
- 'No'
4343
- 'Yes'
44-
ConstraintDescription: 'Please specify if this account has config set-up (Yes / No)'
44+
ConstraintDescription: 'Please specify if this account has AWS Config set-up (Yes / No)'
4545
AdminUserEmailAddress:
4646
Type: String
4747
AllowedPattern: "^[\\w!#$%&’*+/=?`{|}~^-]+(?:\\.[\\w!#$%&’*+/=?`{|}~^-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$"
@@ -71,8 +71,8 @@ Parameters:
7171
- 'Yes'
7272
Default: 'No'
7373
Description: If you would like a read replica creating in a separate AZ. Please select 'Yes'. This will increase the cost of running the solution.
74-
ElasticsearchInstanceType:
75-
Description: The instance type for Elasticsearch data nodes
74+
OpensearchInstanceType:
75+
Description: The instance type for OpenSearch data nodes
7676
Type: String
7777
Default: m6g.large.elasticsearch
7878
AllowedValues:
@@ -136,7 +136,17 @@ Parameters:
136136
- i3.4xlarge.elasticsearch
137137
- i3.8xlarge.elasticsearch
138138
- i3.16xlarge.elasticsearch
139-
139+
140+
141+
OpensearchMultiAz:
142+
Description: Deploys the OpenSearch cluster across two Availability Zones (AZs) in the same region to prevent
143+
data loss and minimize downtime in the event of node or data center failure. This will increase the cost of running the solution
144+
Type: String
145+
Default: "No"
146+
AllowedValues:
147+
- 'Yes'
148+
- 'No'
149+
140150
CreateAPIGatewayCloudWatchLogsRole:
141151
Type: String
142152
Default: "Yes"
@@ -390,6 +400,18 @@ Resources:
390400
- cloudfront:TagResource
391401
- cloudfront:GetDistribution
392402
- cloudfront:CreateInvalidation
403+
- cloudfront:CreateFunction
404+
- cloudfront:DeleteFunction
405+
- cloudfront:DescribeFunction
406+
- cloudfront:GetFunction
407+
- cloudfront:ListFunctions
408+
- cloudfront:UpdateFunction
409+
- cloudfront:TestFunction
410+
- cloudfront:PublishFunction
411+
- cloudfront:GetDistribution
412+
- cloudfront:GetDistributionConfig
413+
- cloudfront:ListTagsForResource
414+
- cloudfront:UpdateDistribution
393415
Resource: '*'
394416
- Effect: Allow
395417
Action:
@@ -509,7 +531,8 @@ Resources:
509531
ANONYMOUS_METRIC_OPT_OUT: !Ref OptOutOfSendingAnonymousUsageMetrics
510532
NEPTUNE_INSTANCE_CLASS: !Ref NeptuneInstanceClass
511533
CREATE_READ_REPLICA: !Ref CreateNeptuneReplica
512-
ELASTICSEARCH_INSTANCE_TYPE: !Ref ElasticsearchInstanceType
534+
OPENSEARCH_INSTANCE_TYPE: !Ref OpensearchInstanceType
535+
OPENSEARCH_MULTI_AZ: !Ref OpensearchMultiAz
513536
ACCOUNT_ID: !Ref AWS::AccountId
514537
API_GATEWAY: !Sub https://${PerspectiveWebRestAPI}.execute-api.${AWS::Region}.amazonaws.com/Prod
515538
SERVER_API_GATEWAY: !Sub https://${ServerGremlinAPI}.execute-api.${AWS::Region}.amazonaws.com/Prod/
@@ -530,7 +553,7 @@ Resources:
530553
DISCOVERY_ARN: !GetAtt PerspectiveDiscoveryRole.Arn
531554
CONFIG_AGGREGATOR: !Sub aws-perspective-${AWS::Region}-${AWS::AccountId}-aggregator
532555
EXISTING_CONFIG: !Ref AlreadyHaveConfigSetup
533-
CREATE_ES_SERVICE_ROLE: !Ref CreateElasticsearchServiceRole
556+
CREATE_OPENSEARCH_SERVICE_ROLE: !Ref CreateOpensearchServiceRole
534557
ATHENA_WORKGROUP: !Ref AthenaWorkgroup
535558
APPSYNC_API_ARN: !GetAtt PerspectiveAppSyncApi.Arn
536559
APPSYNC_API_ID: !GetAtt PerspectiveAppSyncApi.ApiId
@@ -1113,7 +1136,9 @@ Resources:
11131136
- Sid: HttpsOnly
11141137
Action: '*'
11151138
Effect: Deny
1116-
Resource: !Sub arn:aws:s3:::${WebUIBucket}/*
1139+
Resource:
1140+
- !Sub arn:aws:s3:::${WebUIBucket}/*
1141+
- !Sub arn:aws:s3:::${WebUIBucket}
11171142
Principal: '*'
11181143
Condition:
11191144
Bool:
@@ -1154,7 +1179,9 @@ Resources:
11541179
- Sid: HttpsOnly
11551180
Action: '*'
11561181
Effect: Deny
1157-
Resource: !Sub arn:aws:s3:::${AmplifyStorageBucket}/*
1182+
Resource:
1183+
- !Sub arn:aws:s3:::${AmplifyStorageBucket}/*
1184+
- !Sub arn:aws:s3:::${AmplifyStorageBucket}
11581185
Principal: '*'
11591186
Condition:
11601187
Bool:
@@ -1197,7 +1224,9 @@ Resources:
11971224
- Sid: HttpsOnly
11981225
Action: '*'
11991226
Effect: Deny
1200-
Resource: !Sub arn:aws:s3:::${AccessLogsBucket}/*
1227+
Resource:
1228+
- !Sub arn:aws:s3:::${AccessLogsBucket}/*
1229+
- !Sub arn:aws:s3:::${AccessLogsBucket}
12011230
Principal: '*'
12021231
Condition:
12031232
Bool:
@@ -1238,7 +1267,9 @@ Resources:
12381267
- Sid: HttpsOnly
12391268
Action: '*'
12401269
Effect: Deny
1241-
Resource: !Sub arn:aws:s3:::${CostAndUsageAthenaResultsBucket}/*
1270+
Resource:
1271+
- !Sub arn:aws:s3:::${CostAndUsageAthenaResultsBucket}/*
1272+
- !Sub arn:aws:s3:::${CostAndUsageAthenaResultsBucket}
12421273
Principal: '*'
12431274
Condition:
12441275
Bool:
@@ -1273,7 +1304,9 @@ Resources:
12731304
- Sid: HttpsOnly
12741305
Action: '*'
12751306
Effect: Deny
1276-
Resource: !Sub arn:aws:s3:::${CostAndUsageReportBucket}/*
1307+
Resource:
1308+
- !Sub arn:aws:s3:::${CostAndUsageReportBucket}/*
1309+
- !Sub arn:aws:s3:::${CostAndUsageReportBucket}
12771310
Principal: '*'
12781311
Condition:
12791312
Bool:
@@ -1308,7 +1341,9 @@ Resources:
13081341
- Sid: HttpsOnly
13091342
Action: '*'
13101343
Effect: Deny
1311-
Resource: !Sub arn:aws:s3:::${DiscoveryBucket}/*
1344+
Resource:
1345+
- !Sub arn:aws:s3:::${DiscoveryBucket}/*
1346+
- !Sub arn:aws:s3:::${DiscoveryBucket}
13121347
Principal: '*'
13131348
Condition:
13141349
Bool:
-12 KB
Loading

0 commit comments

Comments
 (0)