-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #400 from epam/release/1.13
Release 1.13
- Loading branch information
Showing
71 changed files
with
2,498 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...ples/java/demo-apigateway-cognito/.syndicate-config-demo-apigateway-cognito/syndicate.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
account_id: ACCOUNT_ID | ||
region: REGION_NAME | ||
deploy_target_bucket: BUCKET_NAME | ||
project_path: PROJECT_FOLDER |
5 changes: 5 additions & 0 deletions
5
...a/demo-apigateway-cognito/.syndicate-config-demo-apigateway-cognito/syndicate_aliases.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
account_id: ACCOUNT_ID | ||
region: REGION_NAME | ||
logs_expiration: 30 | ||
|
||
pool_name: USERPOOL_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#### This example shows a Syndicate configuration for deploying: | ||
* 1 Java Lambda function; | ||
* 1 IAM role attached to lambda; | ||
* 1 Custom IAM policy attached to role; | ||
* 1 API Gateway | ||
* 1 Cognito User Pool | ||
|
||
#### To deploy this example: | ||
|
||
##### 1. Replace following placeholders in `syndicate.yml`: | ||
* `ACCOUNT_ID` - AWS account id where syndicate will deploy this demo; | ||
* `REGION_NAME` - AWS region where syndicate will deploy this demo; | ||
* `BUCKET_NAME` - bucket name to upload deployment artifacts, must be unique across all AWS accounts; | ||
* `PROJECT_FOLDER` - absolute path to the project folder; | ||
|
||
##### 2. Replace following placeholder in `syndicate_aliases.yml`: | ||
* `ACCOUNT_ID` - AWS account id where syndicate will deploy this demo; | ||
* `REGION_NAME` - AWS region where syndicate will deploy this demo; | ||
* `USERPOOL_NAME` - desired Cognito User Pool name; | ||
|
||
##### 3. Export config files path (set environment variable SDCT_CONF): | ||
* Unix: `export SDCT_CONF=$CONFIG_FOLDER`, in this example $CONFIG_FOLDER is PROJECT_FOLDER/.syndicate-config-demo-apigateway-cognito; | ||
* Windows (cmd): `set SDCT_CONF=%CONFIG_FOLDER%`, in this example %CONFIG_FOLDER% is PROJECT_FOLDER/.syndicate-config-demo-apigateway-cognito; | ||
|
||
##### 4. Build bundle: | ||
|
||
`syndicate build` | ||
|
||
##### 5. Deploy: | ||
|
||
`syndicate deploy` | ||
|
||
#### 6. To clean project resources: | ||
|
||
`syndicate clean` |
144 changes: 144 additions & 0 deletions
144
examples/java/demo-apigateway-cognito/deployment_resources.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
{ | ||
"lambda-cognito-execution": { | ||
"policy_content": { | ||
"Statement": [ | ||
{ | ||
"Action": [ | ||
"logs:CreateLogGroup", | ||
"logs:CreateLogStream", | ||
"logs:PutLogEvents", | ||
|
||
"cognito-idp:DescribeUserPool", | ||
"cognito-idp:GetUser", | ||
"cognito-idp:ListUsers", | ||
"cognito-idp:AdminCreateUser", | ||
"cognito-idp:AdminInitiateAuth", | ||
"cognito-idp:GetIdentityProviderByIdentifier", | ||
"cognito-idp:ListUserPools", | ||
"cognito-idp:ListUserPoolClients", | ||
"cognito-idp:AdminRespondToAuthChallenge", | ||
|
||
"ssm:PutParameter", | ||
"ssm:GetParameter", | ||
"kms:Decrypt" | ||
], | ||
"Effect": "Allow", | ||
"Resource": "*" | ||
} | ||
], | ||
"Version": "2012-10-17" | ||
}, | ||
"resource_type": "iam_policy" | ||
}, | ||
|
||
"api-handler-role": { | ||
"predefined_policies": [], | ||
"principal_service": "lambda", | ||
"custom_policies": [ | ||
"lambda-cognito-execution" | ||
], | ||
"resource_type": "iam_role" | ||
}, | ||
|
||
"${pool_name}": { | ||
"resource_type": "cognito_idp", | ||
"password_policy": { | ||
"minimum_length": 8, | ||
"require_uppercase": false, | ||
"require_symbols": false, | ||
"require_lowercase": false, | ||
"require_numbers": false | ||
}, | ||
"auto_verified_attributes": [], | ||
"sms_configuration": {}, | ||
"username_attributes": [], | ||
"custom_attributes": [], | ||
"client": { | ||
"client_name": "client-app", | ||
"generate_secret": false, | ||
"explicit_auth_flows": [ | ||
"ALLOW_ADMIN_USER_PASSWORD_AUTH", | ||
"ALLOW_CUSTOM_AUTH", | ||
"ALLOW_USER_SRP_AUTH", | ||
"ALLOW_REFRESH_TOKEN_AUTH" | ||
] | ||
} | ||
}, | ||
|
||
"demo-api-gateway": { | ||
"resource_type": "api_gateway", | ||
"deploy_stage": "api", | ||
"authorizers": { | ||
"authorizer": { | ||
"type": "COGNITO_USER_POOLS", | ||
"identity_source": "method.request.header.Authorization", | ||
"user_pools": [ | ||
"${pool_name}" | ||
], | ||
"ttl": 300 | ||
} | ||
}, | ||
"resources": { | ||
"/": { | ||
"enable_cors": false, | ||
"GET": { | ||
"enable_proxy": true, | ||
"authorization_type": "NONE", | ||
"integration_type": "lambda", | ||
"lambda_name": "api-handler", | ||
"api_key_required": false, | ||
"method_request_parameters": {}, | ||
"integration_request_body_template": {}, | ||
"responses": [], | ||
"integration_responses": [], | ||
"default_error_pattern": true | ||
} | ||
}, | ||
"/secured": { | ||
"enable_cors": false, | ||
"GET": { | ||
"enable_proxy": true, | ||
"authorization_type": "authorizer", | ||
"integration_type": "lambda", | ||
"lambda_name": "api-handler", | ||
"api_key_required": false, | ||
"method_request_parameters": {}, | ||
"integration_request_body_template": {}, | ||
"responses": [], | ||
"integration_responses": [], | ||
"default_error_pattern": true | ||
} | ||
}, | ||
"/signin": { | ||
"enable_cors": false, | ||
"POST": { | ||
"enable_proxy": true, | ||
"authorization_type": "NONE", | ||
"integration_type": "lambda", | ||
"lambda_name": "api-handler", | ||
"api_key_required": false, | ||
"method_request_parameters": {}, | ||
"integration_request_body_template": {}, | ||
"responses": [], | ||
"integration_responses": [], | ||
"default_error_pattern": true | ||
} | ||
}, | ||
"/signup": { | ||
"enable_cors": false, | ||
"POST": { | ||
"enable_proxy": true, | ||
"authorization_type": "NONE", | ||
"integration_type": "lambda", | ||
"lambda_name": "api-handler", | ||
"api_key_required": false, | ||
"method_request_parameters": {}, | ||
"integration_request_body_template": {}, | ||
"responses": [], | ||
"integration_responses": [], | ||
"default_error_pattern": true | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.