Skip to content

Commit 7d416d5

Browse files
author
amazon-meaisiah
committed
Merge origin/staging into meaisiah-staging
2 parents 6ce560a + 27043f9 commit 7d416d5

Some content is hidden

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

50 files changed

+960
-819
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ To send us a pull request, please:
3232
1. Fork the repository.
3333
2. Working off the latest version of the *staging* branch, modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
3434
3. Ensure local tests pass.
35-
4. Commit to your fork using clear commit messages.
36-
5. Send us a pull request merging into the *staging* branch, answering any default questions in the pull request interface.
37-
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
35+
4. Run `prettier` on your new code to ensure style consistency. Remember to only reformat files relevant to your changes.
36+
5. Commit to your fork using clear commit messages.
37+
6. Send us a pull request merging into the *staging* branch, answering any default questions in the pull request interface.
38+
7. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
3839

3940
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
4041
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).

cloudformation/template.yaml

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,14 @@ Resources:
987987
- !Ref 'AWS::AccountId'
988988
- ':marketplace-test-topic'
989989

990+
LambdaCommonLayer:
991+
Type: AWS::Serverless::LayerVersion
992+
Properties:
993+
Description: 'Common code used by lambdas'
994+
ContentUri: ../lambdas/common-layer/
995+
CompatibleRuntimes:
996+
- nodejs8.10
997+
990998
DevPortalLambdaFunction:
991999
Type: AWS::Serverless::Function
9921000
Properties:
@@ -1005,7 +1013,6 @@ Resources:
10051013
FeedbackTableName: !Ref DevPortalFeedbackTableName
10061014
FeedbackSnsTopicArn:
10071015
!If [EnableFeedbackSubmission, !Ref FeedbackSubmittedSNSTopic, '']
1008-
10091016
# Adds the API as a trigger
10101017
Events:
10111018
ProxyApiRoot:
@@ -1020,6 +1027,8 @@ Resources:
10201027
RestApiId: !Ref ApiGatewayApi
10211028
Path: /{proxy+}
10221029
Method: ANY
1030+
Layers:
1031+
- !Ref LambdaCommonLayer
10231032

10241033
SubscriptionListenerLambdaFunction:
10251034
Type: AWS::Serverless::Function
@@ -1030,6 +1039,8 @@ Resources:
10301039
Role: !GetAtt BackendLambdaExecutionRole.Arn
10311040
Runtime: nodejs12.x
10321041
Timeout: 30
1042+
Layers:
1043+
- !Ref LambdaCommonLayer
10331044

10341045
CognitoUserPoolsConfirmationStrategyFunction:
10351046
Type: AWS::Serverless::Function
@@ -1040,6 +1051,8 @@ Resources:
10401051
Role: !GetAtt CognitoStrategyLambdaExecutionRole.Arn
10411052
Runtime: nodejs12.x
10421053
Timeout: 3
1054+
Layers:
1055+
- !Ref LambdaCommonLayer
10431056

10441057
CognitoUserPool:
10451058
Type: AWS::Cognito::UserPool
@@ -1110,6 +1123,8 @@ Resources:
11101123
CodeUri: ../lambdas/cfn-cognito-user-pools-client-settings
11111124
Handler: index.handler
11121125
Role: !GetAtt CognitoUserPoolClientSettingsBackingFnRole.Arn
1126+
Layers:
1127+
- !Ref LambdaCommonLayer
11131128

11141129
CognitoUserPoolClientSettings:
11151130
Type: AWS::CloudFormation::CustomResource
@@ -1190,6 +1205,8 @@ Resources:
11901205
CodeUri: ../lambdas/cfn-cognito-user-pools-domain
11911206
Handler: index.handler
11921207
Role: !GetAtt CognitoUserPoolDomainBackingFnRole.Arn
1208+
Layers:
1209+
- !Ref LambdaCommonLayer
11931210

11941211
CognitoUserPoolDomain:
11951212
Type: AWS::CloudFormation::CustomResource
@@ -1322,6 +1339,8 @@ Resources:
13221339
Environment:
13231340
Variables:
13241341
BucketName: !Ref ArtifactsS3BucketName
1342+
Layers:
1343+
- !Ref LambdaCommonLayer
13251344

13261345
CatalogUpdaterLambdaPermissions:
13271346
Type: AWS::Lambda::Permission
@@ -1344,6 +1363,8 @@ Resources:
13441363
Environment:
13451364
Variables:
13461365
StaticBucketName: !Ref ArtifactsS3BucketName
1366+
Layers:
1367+
- !Ref LambdaCommonLayer
13471368

13481369
StaticAssetUploader:
13491370
Type: AWS::CloudFormation::CustomResource
@@ -1455,6 +1476,61 @@ Resources:
14551476
# https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-route53-aliastarget.html
14561477
HostedZoneId: 'Z2FDTNDATAQYW2'
14571478

1479+
DumpV3AccountDataFn:
1480+
Type: AWS::Serverless::Function
1481+
Properties:
1482+
CodeUri: ../lambdas/dump-v3-account-data
1483+
Handler: index.handler
1484+
MemorySize: 512
1485+
Role: !GetAtt DumpV3AccountDataExecutionRole.Arn
1486+
Runtime: nodejs10.x
1487+
Timeout: 300
1488+
Environment:
1489+
Variables:
1490+
CustomersTableName: !Ref DevPortalCustomersTableName
1491+
UserPoolId: !Ref CognitoUserPool
1492+
AdminsGroupName: !Ref CognitoAdminsGroup
1493+
Layers:
1494+
- !Ref LambdaCommonLayer
1495+
1496+
DumpV3AccountDataExecutionRole:
1497+
Type: AWS::IAM::Role
1498+
Properties:
1499+
AssumeRolePolicyDocument:
1500+
Version: '2012-10-17'
1501+
Statement:
1502+
Effect: Allow
1503+
Principal:
1504+
Service: lambda.amazonaws.com
1505+
Action: sts:AssumeRole
1506+
Policies:
1507+
- PolicyName: WriteCloudWatchLogs
1508+
PolicyDocument:
1509+
Version: '2012-10-17'
1510+
Statement:
1511+
- Effect: Allow
1512+
Action:
1513+
- logs:CreateLogGroup
1514+
- logs:CreateLogStream
1515+
- logs:PutLogEvents
1516+
Resource: arn:aws:logs:*:*:*
1517+
- PolicyName: ReadCustomersTable
1518+
PolicyDocument:
1519+
Version: '2012-10-17'
1520+
Statement:
1521+
- Effect: Allow
1522+
Action: dynamodb:Scan
1523+
Resource: !GetAtt CustomersTable.Arn
1524+
- PolicyName: ListUserPool
1525+
PolicyDocument:
1526+
Version: '2012-10-17'
1527+
Statement:
1528+
- Effect: Allow
1529+
Action:
1530+
- cognito-idp:ListUsers
1531+
- cognito-idp:ListUsersInGroup
1532+
Resource: !GetAtt CognitoUserPool.Arn
1533+
14581534
Outputs:
14591535
WebsiteURL:
14601536
Value: !If [ 'DevelopmentMode',

dev-portal/package-lock.json

Lines changed: 136 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev-portal/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
"not op_mini all"
4444
],
4545
"devDependencies": {
46+
"@testing-library/jest-dom": "^4.0.0",
47+
"@testing-library/react": "^8.0.4",
4648
"mobx-react-devtools": "^6.0.3",
4749
"node-fetch": "^2.3.0",
4850
"react-scripts": "^3.0.1"

dev-portal/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
66
<link rel="shortcut icon" href="%PUBLIC_URL%/custom-content/favicon.ico">
77

88
<script type="text/javascript" src="%PUBLIC_URL%/config.js"></script>

0 commit comments

Comments
 (0)