diff --git a/dev-portal/package.json b/dev-portal/package.json index d2c4085b8..e10fe2ad7 100644 --- a/dev-portal/package.json +++ b/dev-portal/package.json @@ -1,6 +1,6 @@ { "name": "dev-portal", - "homepage": "http://YOUR_CLIENT_BUCKET_NAME.s3-website-YOUR_PRIMARY_AWS_REGION.amazonaws.com/", + "homepage": "http://dmc-sun-api-gateway-developer-portal-web.s3-website-ap-southeast-2.amazonaws.com/", "version": "0.1.0", "private": true, "devDependencies": { diff --git a/dev-portal/public/apigateway-js-sdk/apigClient.js b/dev-portal/public/apigateway-js-sdk/apigClient.js index d1678bbf0..55f45fa5b 100755 --- a/dev-portal/public/apigateway-js-sdk/apigClient.js +++ b/dev-portal/public/apigateway-js-sdk/apigClient.js @@ -41,7 +41,7 @@ apigClientFactory.newClient = function (config) { config.sessionToken = ''; } if(config.region === undefined) { - config.region = 'YOUR_PRIMARY_AWS_REGION'; + config.region = 'ap-southeast-2'; } //If defaultContentType is not defined then default to application/json if(config.defaultContentType === undefined) { @@ -53,7 +53,7 @@ apigClientFactory.newClient = function (config) { } // extract endpoint and path from url - var invokeUrl = 'https://YOUR_API_GATEWAY_API_ID.execute-api.YOUR_PRIMARY_AWS_REGION.amazonaws.com/prod'; + var invokeUrl = 'https://j20t6je166.execute-api.ap-southeast-2.amazonaws.com/prod'; var endpoint = /(^https?:\/\/[^\/]+)/g.exec(invokeUrl)[1]; var pathComponent = invokeUrl.substring(endpoint.length); diff --git a/dev-portal/src/services/aws.js b/dev-portal/src/services/aws.js index 2d964c3bc..e4293de30 100644 --- a/dev-portal/src/services/aws.js +++ b/dev-portal/src/services/aws.js @@ -1,8 +1,8 @@ import AWS from 'aws-sdk' -export const awsRegion = 'YOUR_PRIMARY_AWS_REGION' -export const cognitoRegion = 'YOUR_COGNITO_REGION' -export const cognitoUserPoolId = 'YOUR_COGNITO_USER_POOL_ID' -export const cognitoIdentityPoolId = 'YOUR_COGNITO_IDENTITY_POOL_ID' -export const cognitoClientId = 'YOUR_COGNITO_CLIENT_ID' +export const awsRegion = 'ap-southeast-2' +export const cognitoRegion = 'ap-southeast-2' +export const cognitoUserPoolId = 'ap-southeast-2_sZtrKeRmm' +export const cognitoIdentityPoolId = 'ap-southeast-2:5601faef-3999-4ded-8371-fd0f3b291a65' +export const cognitoClientId = '5acfm2154151lk01hbn244rdg7' AWS.config.region = cognitoRegion diff --git a/lambdas/backend/dev-portal-express-proxy-api.yaml b/lambdas/backend/dev-portal-express-proxy-api.yaml index ce634d0f3..08f933b00 100644 --- a/lambdas/backend/dev-portal-express-proxy-api.yaml +++ b/lambdas/backend/dev-portal-express-proxy-api.yaml @@ -2,7 +2,7 @@ swagger: 2.0 info: version: 2016-09-02T22:37:24Z - title: YOUR_API_GATEWAY_API_NAME + title: Developer Portal basePath: /prod schemes: - https @@ -20,7 +20,7 @@ paths: responses: default: statusCode: 200 - uri: arn:aws:apigateway:YOUR_PRIMARY_AWS_REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:YOUR_PRIMARY_AWS_REGION:YOUR_ACCOUNT_ID:function:${stageVariables.DevPortalFunctionName}/invocations + uri: arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:637693983280:function:${stageVariables.DevPortalFunctionName}/invocations passthroughBehavior: when_no_match httpMethod: POST type: aws_proxy @@ -59,7 +59,7 @@ paths: - application/json responses: {} x-amazon-apigateway-integration: - uri: arn:aws:apigateway:YOUR_PRIMARY_AWS_REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:YOUR_PRIMARY_AWS_REGION:YOUR_ACCOUNT_ID:function:${stageVariables.DevPortalFunctionName}/invocations + uri: arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:637693983280:function:${stageVariables.DevPortalFunctionName}/invocations httpMethod: POST type: aws_proxy options: @@ -97,7 +97,7 @@ paths: - application/json responses: {} x-amazon-apigateway-integration: - uri: arn:aws:apigateway:YOUR_PRIMARY_AWS_REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:YOUR_PRIMARY_AWS_REGION:YOUR_ACCOUNT_ID:function:${stageVariables.DevPortalFunctionName}/invocations + uri: arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:637693983280:function:${stageVariables.DevPortalFunctionName}/invocations httpMethod: POST type: aws_proxy options: @@ -135,7 +135,7 @@ paths: - application/json responses: {} x-amazon-apigateway-integration: - uri: arn:aws:apigateway:YOUR_PRIMARY_AWS_REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:YOUR_PRIMARY_AWS_REGION:YOUR_ACCOUNT_ID:function:${stageVariables.DevPortalFunctionName}/invocations + uri: arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:637693983280:function:${stageVariables.DevPortalFunctionName}/invocations httpMethod: POST type: aws_proxy options: @@ -180,7 +180,7 @@ paths: type: string responses: {} x-amazon-apigateway-integration: - uri: arn:aws:apigateway:YOUR_PRIMARY_AWS_REGION:lambda:path/2015-03-31/functions/arn:aws:lambda:YOUR_PRIMARY_AWS_REGION:YOUR_ACCOUNT_ID:function:${stageVariables.DevPortalFunctionName}/invocations + uri: arn:aws:apigateway:ap-southeast-2:lambda:path/2015-03-31/functions/arn:aws:lambda:ap-southeast-2:637693983280:function:${stageVariables.DevPortalFunctionName}/invocations httpMethod: POST type: aws_proxy options: diff --git a/lambdas/backend/express-server.js b/lambdas/backend/express-server.js index b21941c14..425a0a9dd 100644 --- a/lambdas/backend/express-server.js +++ b/lambdas/backend/express-server.js @@ -13,7 +13,7 @@ const app = express() const apigateway = new AWS.APIGateway() // replace these to match your site URL. Note: Use TLS, not plain HTTP, for your production site! -const domain = 'YOUR_CLIENT_BUCKET_NAME.s3-website-YOUR_PRIMARY_AWS_REGION.amazonaws.com' +const domain = 'dmc-sun-api-gateway-developer-portal-web.s3-website-ap-southeast-2.amazonaws.com' const baseUrl = `http://${domain}/` app.use(cors()) diff --git a/package.json b/package.json index 3d79d8182..ee4c65068 100644 --- a/package.json +++ b/package.json @@ -4,19 +4,19 @@ "description": "Example application for running a Serverless Developer Portal with API Gateway and Lambda", "main": "lambda.js", "config": { - "artifactsS3Bucket": "YOUR_ARTIFACTS_BUCKET_NAME", - "siteS3Bucket": "YOUR_CLIENT_BUCKET_NAME", - "accountId": "YOUR_ACCOUNT_ID", - "primaryAwsRegion": "YOUR_PRIMARY_AWS_REGION", - "cloudFormationStackName": "YOUR_CLOUDFORMATION_STACK_NAME", - "apiGatewayApiName": "YOUR_API_GATEWAY_API_NAME", + "artifactsS3Bucket": "dmc-sun-api-gateway-developer-portal", + "siteS3Bucket": "dmc-sun-api-gateway-developer-portal-web", + "accountId": "637693983280", + "primaryAwsRegion": "ap-southeast-2", + "cloudFormationStackName": "DeveloperPortal", + "apiGatewayApiName": "Developer Portal", "customersTableName": "DevPortalCustomers", "identityPoolName": "DevPortal", - "apiGatewayApiId": "YOUR_API_GATEWAY_API_ID", - "cognitoRegion": "YOUR_COGNITO_REGION", - "cognitoUserPoolId": "YOUR_COGNITO_USER_POOL_ID", - "cognitoClientId": "YOUR_COGNITO_CLIENT_ID", - "cognitoIdentityPoolId": "YOUR_COGNITO_IDENTITY_POOL_ID", + "apiGatewayApiId": "j20t6je166", + "cognitoRegion": "ap-southeast-2", + "cognitoUserPoolId": "ap-southeast-2_sZtrKeRmm", + "cognitoClientId": "5acfm2154151lk01hbn244rdg7", + "cognitoIdentityPoolId": "ap-southeast-2:5601faef-3999-4ded-8371-fd0f3b291a65", "listenerLambdaFunctionName": "DevPortalSubscriptionListener", "marketplaceSubscriptionTopic": "arn:aws:sns:us-east-1:287250355862:aws-mp-subscription-notification-PRODUCT_CODE" },