Coder Social home page Coder Social logo

aws-api-gateway-developer-portal's Introduction

The Serverless Developer Portal is in maintenance mode. During maintenance mode, we will continue to supply bug fixes and security updates.

Introduction

Build Status

The Amazon API Gateway Serverless Developer Portal is an application that you use for developer engagement by making your API Gateway APIs available to your customers through self-service discovery of those APIs. Your customers can use the developer portal to browse API documentation, register for – and immediately receive – their own API key that can be used to build applications, test published APIs, monitor their own API usage, generate SDKs, and submit feedback on your APIs design.

For more information about Amazon API Gateway, visit the API Gateway product page.

Home screen Documentation screen

Setup

There are three main ways to deploy the Developer Portal today:

  1. Deploy using SAR
  2. Deploy using SAM
  3. Deploy using the development scripts

1. Deploy using SAR

If all you want to do is deploy it as it is out of the box, you can do it by simply following the instructions in the Serverless Developer Portal documentation.

2. Deploy using SAM

If you plan to automate the deployment through your own infrastructure or if you just want to customize the template, you can just use the SAM CLI to do it. See the SAM Deployment Guide for how to do this.

3. Deploy using the development scripts

This deployment model is better if you choose to modify the developer portal assets and/or design itself or if you need to do something else more advanced. See the development guide for how to do this.

Prerequisites

First, ensure you have the latest version of the SAM CLI installed. Note that while the instructions specify Docker as a pre-requisite, Docker is only necessary for local development via SAM local. Feel free to skip installing Docker when you first set up the developer portal.

Then, clone this repo into a local directory. Ensure that you have an S3 bucket to put zipped lambda functions into. It can be private, and will be referred to in this readme as YOUR_LAMBDA_ARTIFACTS_BUCKET_NAME.

If you have not used the AWS CLI or SAM CLI before, you may need to configure your AWS credentials file.

If you have previously set up a v1 developer portal (non-SAM deployed), you will need to either remove all the v1 developer portal resources (dynamo tables, roles, etc.) or provide new names for the v2 developer portal by passing in parameter overrides for every resource.

Deploy

Run the following, with YOUR_LAMBDA_ARTIFACTS_BUCKET_NAME replaced with the name of a bucket that you manage and that already exists.

If you're on Windows, you'll need to remove the backslashes and line breaks here for these commands to work.

sam package --template-file ./cloudformation/template.yaml \
    --output-template-file ./cloudformation/packaged.yaml \
    --s3-bucket YOUR_LAMBDA_ARTIFACTS_BUCKET_NAME

Then run the following, with YOUR_LAMBDA_ARTIFACTS_BUCKET_NAME the same as above and CUSTOM_PREFIX in all cases replaced with some shared prefix that is globally unique across AWS, like your org name or username.

Note: do not use the sam deploy command suggested by the sam package command.

sam deploy --template-file ./cloudformation/packaged.yaml \
    --stack-name "dev-portal" \
    --s3-bucket YOUR_LAMBDA_ARTIFACTS_BUCKET_NAME \
    --capabilities CAPABILITY_NAMED_IAM \
    --parameter-overrides \
    DevPortalSiteS3BucketName="CUSTOM_PREFIX-dev-portal-static-assets" \
    ArtifactsS3BucketName="CUSTOM_PREFIX-dev-portal-artifacts" \
    CognitoDomainNameOrPrefix="CUSTOM_PREFIX"

The command will exit when the stack creation is successful. If you'd like to watch it create in real-time, you can log into the cloudformation console.

To get the URL for the newly created developer portal instance, find the websiteURL field in the cloudformation console's outputs or run this command:

aws cloudformation describe-stacks --query \
    "Stacks[?StackName=='dev-portal'][Outputs[?OutputKey=='WebsiteURL']][][].OutputValue"

You can override any of the parameters in the template using the --parameter-overrides key="value" format. This will be necessary if you intend to deploy several instances of the developer portal or customize some of the features. You can see a full list of overridable parameters in cloudformation/template.yaml under the Parameters section.

Registering Users

Users can self-register by clicking the 'Register' button in the developer portal. Cognito calls the CognitoPreSignupTriggerFn lambda to determine if the user is allowed to register themselves. By default, this function always accepts the user into the user pool, but you can customize the body of the function either in a local repository (followed by packaging and deploying) or in the lambda console. If you intend for the developer portal to be 'private' to some group of users (and not globally / freely accessible), you will need to write a lambda function that enforces your business logic for user registration. Documentation on this lambda function's use can be found here.

Promoting a User to an Admin

Admin users can manage what APIs are visible to normal users and whether or not SDK generation is enabled (per api) for normal users. To promote a user to an admin, go to the Cognito console in the account the developer portal is in, select User Pools, then select the correct User Pool for the dev portal. From there, choose Users and groups, click on the users' name, choose Add to group, and select the group named STACK-NAMEAdminsGroup. This user is now an admin; if they're currently logged in, they will have to log out and back in to receive admin credentials.

Populate the API catalog

By default the Developer Portal won't list any APIs. You will have to pick and choose which APIs to show. There are 2 types of APIs:

Subscribable APIs

For an API to be subscribable, they must be managed by Amazon API Gateway. The Developer Portal can let a user associate their API Key with these APIs (via the Subscribe button) so they can start calling and developing on these APIs.

To list a subscribable API:

  1. In API Gateway's console or CLI, associate that API & stage to a usage plan.
  2. Log into the developer portal using an admin account and go to the Admin Panel tab.
  3. In the "Displayed" column, click "False".

Non-subscribable APIs

The Developer can also list APIs that are managed outside of Amazon API Gateway (e.g., APIs hosted on-premise). The Developer Portal won't be able to associate an API Key with the API automatically; however, customers can still test the APIs.

To list a non-subscribable API:

  1. Log into the developer portal using an admin account and go to the Admin Panel tab.
  2. In the "Generic APIs" table, click "Add API", select an API specification file (Swagger or OAS3 in .json, .yaml, or .yml), and upload it.

Testing your APIs

When logged into the developer portal with an account that has a provisioned api key, you should be able to test your APIs by selecting a resource/method in them and clicking "Try it out!". Note that this requires CORS to be set up on your API to allow the developer portal to call it. Note that the default PetStore has CORS enabled on all resources but /.

Before going to production

Setup a custom domain for your Developer Portal

You should request and verify an ACM managed certificate for your custom domain name. Then, redeploy the CFN stack with the domain name and ACM cert ARN as parameter overrides. Additionally, you can control if Route 53 nameservers are created using the UseRoute53Nameservers override. A value of true will result in the creation of a Route 53 hosted zone and record set; false will skip the creation of these resources.

Use the same CUSTOM_PREFIX and YOUR_LAMBDA_ARTIFACTS_BUCKET_NAME you used in the deploy before.

sam deploy --template-file ./cloudformation/packaged.yaml \
    --stack-name "dev-portal" \
    --s3-bucket YOUR_LAMBDA_ARTIFACTS_BUCKET_NAME \
    --capabilities CAPABILITY_NAMED_IAM \
    --parameter-overrides \
    DevPortalSiteS3BucketName="CUSTOM_PREFIX-dev-portal-static-assets" \
    ArtifactsS3BucketName="CUSTOM_PREFIX-dev-portal-artifacts" \
    CustomDomainName="my.acm.managed.domain.name.com" \
    CustomDomainNameAcmCertArn="arn:aws:acm:us-east-1:111111111111:certificate/12345678-1234-1234-1234-1234567890ab" \
    UseRoute53Nameservers="false"

This creates a cloudfront distribution in front of the S3 bucket serving the site, optionally sets up a Route53 hosted zone with records aliased to that distribution, and require HTTPS to communicate with the cloudfront distribution.

If you chose UseRoute53Nameservers=true, after the deployment finishes, go to the Route53 console, find the nameservers for the hosted zone created by the deployment, and add those as the nameservers for your domain name through your registrar. The specifics of this process will vary by registrar.

If you chose UseRoute53Nameservers=false, instead point your nameservers at the cloudfront distribution's URL.

Add custom content and brand the Developer Portal

See this page on customization

Updating to a new version

The Developer Portal follows the semantic versioning scheme (major.minor.patch). Changes to the minor or patch version are backwards compatible so you should feel safe to get the latest version. For changes to major versions, please see this page on updating.

To update a SAM deployment:

  1. Get the latest version from GitHub (Clone/Pull/Download).
  2. When deploying follow the same steps as previous and use the same values for the parameters. The only difference is passing in a new value for the stack parameter StaticAssetRebuildToken. You can use any string for this as long as it is different than previously used.

To update a SAR deployment

  1. When deploying follow the same steps as previous and use the same values for the parameters. The only difference is passing in a new value for the stack parameter StaticAssetRebuildToken.

Components

For an overview of the components of the developer portal, please see this page.

Debugging

You can trace and troubleshoot the Lambda functions using CloudWatch Logs. See this blog post for more information.

Tear-down

Deleting the developer portal should be as easy as deleting the cloudformation stack. This will empty the ArtifactsS3Bucket and DevPortalSiteS3Bucket s3 buckets, including any custom files! Note that this will not delete any api keys provisioned by the developer portal. If you would like to delete api keys provisioned through the developer portal but not those provisioned through other means, make sure to download a backup of the Customers DDB table before deleting the cloudformation stack. This table lists the provisioned api keys that will need to be cleaned up afterwards.

aws-api-gateway-developer-portal's People

Contributors

a-tan avatar aasthavar avatar alex-chew avatar andyfegan avatar aws-amit avatar bejos-aws avatar brettstack avatar caseyben avatar danielesalvatore avatar dependabot[bot] avatar droolingpanda avatar echo-bravo-yahoo avatar etsung-aws avatar gbroques avatar hyandell avatar ichuckyi avatar kahouieong avatar lloypark avatar markcarroll avatar mvanbaak avatar mynockspit avatar nitishdayal avatar philcaixeta avatar rpgreen avatar russ-k avatar skylarbemus avatar sylistron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-api-gateway-developer-portal's Issues

Cannot find module 'is-my-json-valid'

Hi,

I have successfully setup the developer portal.

When start the server on local npm run start. I'm getting the following message in both browser and in the server side:

Failed to compile.

Error in Cannot find module 'is-my-json-valid'
@ multi main

I could not figure out want went wrong, so I restart the all process deleting the existing setup using
npm run delete-artifacts-bucket
npm run delete-app-bucket
npm run delete-stack

Now when I relaunch the initial set-up with npm run setup, the process stuck on:
Waiting for changeset to be created..

If I go to CloudFormation page I can see the DeveloperPortal Stack but the status is REVIEW_IN_PROGRESS. The script remain stuck until timeout.

I don't know what this status means and I could not do any action from the CloudFormation.

Pleas advise as I am no longer able to set-up the portal.

Thanks

JF

blank screen after deployment

I deployed the portal in AWS cloud with no errors in CloudFormation steps (npm run setup). The entry page appears blank with the following error in the console: (tried in safari, chrome).
I also tried to run the portal locally with the same error (localhost:3000). Any idea why?

Uncaught TypeError: Cannot read property 'msie' of undefined
    at jquery.ba-bbq.min.js:18
    at jquery.ba-bbq.min.js:18
webpack:///./~/react-dom/lib/ReactDOM.js?:73 Download the React DevTools for a better development experience: https://fb.me/react-devtools
webpack:///./~/fbjs/lib/warning.js?:36 Warning: Failed context type: The context `history` is marked as required in `Link`, but its value is `undefined`.
    in Link (at index.js:65)
    in div (at index.js:64)
    in div (at index.js:63)
    in Router (created by BrowserRouter)
    in BrowserRouter (at index.js:62)
    in App (at index.js:8)
printWarning @ webpack:///./~/fbjs/lib/warning.js?:36
webpack:///./~/react-router-dom/Link.js?:72 Uncaught TypeError: Cannot read property 'createHref' of undefined
    at Link.render (webpack:///./~/react-router-dom/Link.js?:72)
    at eval (webpack:///./~/react-dom/lib/ReactCompositeComponent.js?:796)
    at measureLifeCyclePerf (webpack:///./~/react-dom/lib/ReactCompositeComponent.js?:75)
    at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (webpack:///./~/react-dom/lib/ReactCompositeComponent.js?:795)
    at ReactCompositeComponentWrapper._renderValidatedComponent (webpack:///./~/react-dom/lib/ReactCompositeComponent.js?:822)
    at ReactCompositeComponentWrapper.performInitialMount (webpack:///./~/react-dom/lib/ReactCompositeComponent.js?:362)
    at ReactCompositeComponentWrapper.mountComponent (webpack:///./~/react-dom/lib/ReactCompositeComponent.js?:258)
    at Object.mountComponent (webpack:///./~/react-dom/lib/ReactReconciler.js?:46)
    at ReactDOMComponent.mountChildren (webpack:///./~/react-dom/lib/ReactMultiChild.js?:238)
    at ReactDOMComponent._createInitialChildren (webpack:///./~/react-dom/lib/ReactDOMComponent.js?:691)

Cannot Access API Pages

With the fixes for #14 I cannot render the API pages. With a forked deploy of this repo hitting the end point {{URL}}/apis/YOUR_API_ID results in an undefined error.

Uncaught TypeError: Cannot read property 'apiId' of undefined
    at new t (main.48bf613a.js:32)
    at l._constructComponentWithoutOwner (main.48bf613a.js:29)
    at l._constructComponent (main.48bf613a.js:29)
    at l.mountComponent (main.48bf613a.js:29)
    at Object.mountComponent (main.48bf613a.js:4)
    at l.performInitialMount (main.48bf613a.js:29)
    at l.mountComponent (main.48bf613a.js:29)
    at Object.mountComponent (main.48bf613a.js:4)
    at l.performInitialMount (main.48bf613a.js:29)
    at l.mountComponent (main.48bf613a.js:29)```

Unable to import module 'index': Error

I'm seeing this error in cloudwatch when clicking on the API's link after deploying the developer portal

START RequestId: 515f2f43-5e26-11e7-8c2d-af9c53f4a702 Version: $LATEST

Unable to import module 'index': Error at Function.Module._resolveFilename (module.js:325:15) at Function.Module._load (module.js:276:25) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at Object. (/var/task/express-server.js:10:29) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10) at Modu
Unable to import module 'index': Error
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/var/task/express-server.js:10:29)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)

License headers

The LICENSE in the root of the project states Apache License 2.0, but the license is not applied to any of the files, nor are copyright holders mentioned anywhere. How should this project be mentioned, and who are the actual copyright holders? Could headers be added to the source code files?

common-lambda-assets missing

Not sure if this is intended but script lambdas-npm-install completely removes the common-lambda-assets from package.json files. This is a problem when deploying because it cant find the module when evoking a Lambda function. Server will throw a 502 error.

To resolve this, I just removed npm run lambdas-npm-install && from the package script and everything works correctly.

node -v
v8.1.4
npm -v
5.0.3

Failing to render react site

Upon following all steps in https://aws.amazon.com/blogs/compute/generate-your-own-api-gateway-developer-portal/ there appears to be a problem with (some of) the react code. Chrome throws out the following:

DevTools failed to parse SourceMap: http://elp-apigwtest-dev.s3-website-us-west-2.amazonaws.com/apigateway-js-sdk/lib/axios/dist/axios.map

jquery.ba-bbq.min.js:18 Uncaught TypeError: Cannot read property 'msie' of undefined
    at jquery.ba-bbq.min.js:18
    at jquery.ba-bbq.min.js:18
(anonymous) @ jquery.ba-bbq.min.js:18
(anonymous) @ jquery.ba-bbq.min.js:18
Link.js:72Uncaught TypeError: Cannot read property 'createHref' of undefined
    at t.render (Link.js:72)
    at l._renderValidatedComponentWithoutOwnerOrContext (ReactCompositeComponent.js:799)
    at l._renderValidatedComponent (ReactCompositeComponent.js:822)
    at l.performInitialMount (ReactCompositeComponent.js:362)
    at l.mountComponent (ReactCompositeComponent.js:258)
    at Object.mountComponent (ReactReconciler.js:46)
    at y.mountChildren (ReactMultiChild.js:238)
    at y._createInitialChildren (ReactDOMComponent.js:691)
    at y.mountComponent (ReactDOMComponent.js:516)
    at Object.mountComponent (ReactReconciler.js:46)

I have manually added the dev-portal/src/catalog.json file which was apparently missing and I ran npm run upload-site, but nothing has changed.

I think it is worth mentioning that there are no errors anywhere when running npm run setup. The whole process works flawlessly.

UI fails to load, throws errors

Hello,

Deploy script runs successfully, but I end up with a blank page with two errors in browser's console:

ncaught TypeError: Cannot read property 'msie' of undefined
at jquery.ba-bbq.min.js:18
at jquery.ba-bbq.min.js:18

reactProdInvariant.js:35Error: Minified React error #130; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=130&args[]=undefined&args[]=%20Check%20the%20render%20method%20of%20%60t%60. for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at r (reactProdInvariant.js:31)

The first error I was able to get around by modifying jquery.ba-bbq.min.js file as suggested here: http://stackoverflow.com/questions/23074644/jquery-bbq-generates-error-with-jquery-2

For the second, I'm still not sure what the root cause is. Is this something you've encountered?

I ran the deployment script on Windows with 'npm run win-setup'. No errors, a few warnings:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\react-scripts\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

I'm using aws-cli version 1.11.44 and Node.js v6.9.1.
Errors occur when running on AWS as well as in local deployment.

502 error

I am facing issue as getting Error 502 (Bad gateway) while 'Register' and clicking on 'ÁPIs'.
After Signin call, it will show 502 error. And popup wont close.
Similarly if I click on 'APIs' link in home page. Same 502 error.

Site built using the procedure in the README doesn't work

When I run through the instructions in the README, the project build and deploys, but trying to use the portal fails immediately. In the JS console I get errors like:

https://cognito-idp.your.amazonaws.com/ Failed to load resource: net::ERR_NAME_NOT_RESOLVED 
https://your_api_gateway_api_id.execute-api.your_primary_aws_region.amazonaws.com/prod/catalog?start=undefined&end=undefined Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Basically it looks like a lot of the output from the CloudFormation stack failed to be substituted into the proper files. I can see config scripts that look like they should do that, but I don't know node.js at all and so have no idea what the problem is. I'm running on a Mac with node and they AWS CLI installed via Homebrew:

$ aws --version
aws-cli/1.11.29 Python/2.7.10 Darwin/15.6.0 botocore/1.4.86
$ node --version
v7.2.1
$ npm --version
3.10.9

500 Errors

I managed to register an user however I'm getting some errors after trying to sign in:

jquery.ba-bbq.min.js:18 Uncaught TypeError: Cannot read property 'msie' of undefined(…)(anonymous function) @ jquery.ba-bbq.min.js:18(anonymous function) @ jquery.ba-bbq.min.js:18
DevTools failed to parse SourceMap: http://xxxxxxx.s3-website-us-east-1.amazonaws.com/apigateway-js-sdk/lib/axios/dist/axios.map

It seems to be related to the SDK. After that the page is stuck in the "loading" spinner and I get a 500 error from the API:

XMLHttpRequest cannot load https://xxxxxxxx.execute-api.us-east-1.amazonaws.com/prod/catalog?end=undefined&start=undefined. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://xxxxxxx.s3-website-us-east-1.amazonaws.com' is therefore not allowed access. The response had HTTP status code 500.

After checking the CloudWatch logs I got this:

04:12:27
Starting execution for request: 5f02b74c-b77c-11e6-b9b5-b707c4cef7d3

04:12:27
HTTP Method: GET, Resource Path: /catalog

04:12:27
Method request path: {}

04:12:27
Method request query string: {start=undefined, end=undefined}

04:12:27
Method request headers: {Origin=http://xxxxxxxxxx.s3-website-us-east-1.amazonaws.com, X-AMZ-Date=20161201T041226Z, Accept=application/json, CloudFront-Viewer-Country=AU, CloudFront-Forwarded-Proto=https, CloudFront-Is-Tablet-Viewer=false, CloudFront-Is-Mobile-Viewer=false, Referer=http://xxxxxxxxxx.s3-website-us-east-1.amazonaws.com/apis, User-Agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_

04:12:27
Method request body before transformations:

04:12:27
Endpoint request URI: https://lambda.us-east-1.amazonaws.com/2015-03-31/functions/arn:aws:lambda:us-east-1:xxxxxxxxxxxx:function:DeveloperPortal-DevPortalLambdaFunction-XDLZNFTKWS4/invocations

04:12:27
Endpoint request headers: {x-amzn-lambda-integration-tag=5f02b74c-b77c-11e6-b9b5-b707c4cef7d3, Authorization=***************************************************************************************************************************************************************************************************************************************************************************************************

04:12:27
Endpoint request body after transformations: {"resource":"/catalog","path":"/catalog","httpMethod":"GET","headers":{"Accept":"application/json","Accept-Encoding":"gzip, deflate, sdch, br","Accept-Language":"en-GB,en;q=0.8,en-US;q=0.6,pt-BR;q=0.4,pt;q=0.2","CloudFront-Forwarded-Proto":"https","CloudFront-Is-Desktop-Viewer":"true","CloudFront-Is-Mobile-Viewer":"false","CloudFront-Is-SmartTV-Viewer":

04:12:27
Execution failed due to configuration error: Invalid permissions on Lambda function

04:12:27
Method completed with status: 500

It seems the SAM template is creating a trigger pointing to the wrong stage:

https://xxxxxxxxxxx.execute-api.us-east-1.amazonaws.com/Prod/

My API stage is "prod", not "Prod"

npm run setup fails also /APIs page never loads

I was in the process of adding our Swagger file to the portal, which I had tested long ago with success, and am seeing what appears to be a bug. When I attempt to open the APIs page it just spins.
image003

When I run the setup node script from the root of the site that also fails to complete. I grabbed a fresh copy of the repository from GitHub but this did not make a difference. The script stops running and the "?" appears in the terminal. I am running this on a Mac.

Node v9.3.0
NPM v5.8.0

2018-04-10T14_56_58_122Z-debug.log

image004

aws cloudformation deploy failure

HI,

I receive the following error on cloudformation deploy:

npm ERR! Darwin 15.6.0
npm ERR! argv "/Users/ddmitrioglo/.nvm/versions/node/v4.7.2/bin/node" "/Users/ddmitrioglo/.nvm/versions/node/v4.7.2/bin/npm" "run" "deploy"
npm ERR! node v4.7.2
npm ERR! npm v2.15.11
npm ERR! code ELIFECYCLE
npm ERR! [email protected] deploy: aws cloudformation deploy --template-file packaged-sam.yaml --stack-name $npm_package_config_cloudFormationStackName --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM --parameter-overrides ArtifactsS3Bucket=$npm_package_config_artifactsS3Bucket DevPortalSiteS3Bucket=$npm_package_config_siteS3Bucket MarketplaceSubscriptionTopic=$npm_package_config_marketplaceSubscriptionTopic CognitoIdentityPoolName="$npm_package_config_identityPoolName" DevPortalCustomersTableName=$npm_package_config_customersTableName --region $npm_package_config_primaryAwsRegion
npm ERR! Exit status 255

Should I update the repo or I can fix it somehow?

Main page empty

I did run win-setup; cloudformation executed correctly and has errors. Index page displayed, but there is no information, it is displaying only the title and the icon.

-I have awscli-1.11.57
-node --version
v6.9.1

Am I missing one step because i am using windows?

Did someone has an issue with empty page not displaying login option or documentation option?
I have same issue locally or using s3 web hosting.

CognitoIdentityPoolRoles creations fails

I cannot get the dev portal to deploy. When running npm run setup the cloudformation stack create/update step fails when attempting to create the Custom::CognitoIdentityPoolRoles resource. Digging into the logs I see:

"message": "User: arn:aws:sts::8XXXXXXXXX:assumed-role/DeveloperPortal-CognitoCustomResourceLambdaExecuti-KXXXXXXXXXX/DeveloperPortal-CognitoCustomResourceLambda-1XXXXXXXXXX is not authorized to perform: iam:PassRole on resource: arn:aws:iam::8XXXXXXXXXX:role/DeveloperPortal-CognitoAuthenticatedRole-6XXXXXXX",
"code": "AccessDeniedException"

Clearly it's a permissions error, but the IAM user I'm doing all this under has admin access. I've tried a couple of regions including us-east-1. I'm running node version 7.3.0, npm version 4.1.1 and awscli version is 1.11.33.

Any idea what might be causing this error?

usage plan ID not updated

Hi,

When subscribing to API, I get error 500.

PUT https://xxxx.execute-api.eu-central-1.amazonaws.com/prod/subscriptions/OLD_ID 500 ()

lambdas\backend\catalog\index.js

const usagePlans = [{
  id: 'NEW_ID',
  name: 'Basic',
  apis: [{
    id: '123456',
    image: '/xxx-api-logo.png',
    swagger: apiSwaggerDefinition
  }]
}]

I do npm run upload-site to publish update of portal. I cleared browser cache, removed build folder, I still have the OLD_ID in url.

What should I do?

Using Linux distributions of node can cause the react build to fail

This issue isn't specific to this project, but it does cause the project to fail:

> [email protected] build /home/jbartle9/Development/AWS/APIGateway/AIA/aws-api-gateway-developer-portal/dev-portal
> react-scripts build

Creating an optimized production build...
Failed to compile.

static/js/main.91fca694.js from UglifyJs
Unexpected character '`' [/usr/lib/nodejs/events.js:260,0]

This appears to explain the root cause issue (node distribution source making it into NODE_PATH). I am far from proficient in npm/node, let alone react, so I really don't know what needs changing to this project to alleviate this problem for us Linux users.

unable to load the UI

The homepage does not load. It throws following error in the chrome developer tools

jquery.ba-bbq.min.js:18 Uncaught TypeError: Cannot read property 'msie' of undefined
at jquery.ba-bbq.min.js:18
at jquery.ba-bbq.min.js:18

Uncaught TypeError: Cannot read property 'createHref' of undefined
at t.render (Link.js:72)
at l._renderValidatedComponentWithoutOwnerOrContext (ReactCompositeComponent.js:799)
at l._renderValidatedComponent (ReactCompositeComponent.js:822)
at l.performInitialMount (ReactCompositeComponent.js:362)
at l.mountComponent (ReactCompositeComponent.js:258)
at Object.mountComponent (ReactReconciler.js:46)
at y.mountChildren (ReactMultiChild.js:238)
at y._createInitialChildren (ReactDOMComponent.js:691)
at y.mountComponent (ReactDOMComponent.js:516)
at Object.mountComponent (ReactReconciler.js:46)

Unable to get the README procedure to work

The procedure fails with these initial log outputs:

usage: aws [options] <command> <subcommand> [parameters]
aws: error: argument operation: Invalid choice, valid choices are:

cancel-update-stack                      | create-stack                            
delete-stack                             | describe-stack-events                   
describe-stack-resource                  | describe-stack-resources                
describe-stacks                          | get-stack-policy                        
get-template                             | list-stack-resources                    
list-stacks                              | set-stack-policy                        
update-stack                             | validate-template                       
help

The error messages then tell me to tell you that "this fails on my system":

npm run lambdas-npm-install && aws cloudformation package --template cloudformation/base.yaml --s3-bucket $npm_package_config_artifactsS3Bucket --output-template packaged-sam.yaml --region $npm_package_config_primaryAwsRegion

Version info is as follows:

npm ERR! Linux 3.13.0-107-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "setup"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6

Add into that AWS CLI version info:

aws-cli/1.11.51 Python/2.7.6 Linux/3.13.0-107-generic botocore/1.5.14

and then there is the obligatory attached file.

npm-debug.log.txt

Thanks

"Try it Out" does not work

Hi have successfully created my portal with my own APIs and I can navigate in all the methods.

For all the method when I press the "Try it Out" button I always get

Response code 0 and
Response Headers {
"error": "no response from server"
}

If I copy the generated curl command and execute it it works fine.

Any idea how I could fix this?

Thanks
JF

try it out

Usage Plans, API and Marketplace Product Code Relations

With the latest changes introduced, in the API Gateway Usage Plans we can configure:

  1. Multiple API/Stages assigned to the Usage Plan
  2. Multiple API Keys assigned to the Usage Plan
  3. Single Marketplace Product Code

The Usage Plan definition is:

…A usage plan provides access to one or more deployed API stages with configurable throttling and quota limits enforced on individual client API keys… Throttling and quota limits apply to requests for individual API keys that are aggregated across all API stages within a usage plan….

So it seems the relation Marketplace Product Code/API(Stages) is one-to-many.

However, in both blogs:

https://aws.amazon.com/blogs/compute/generate-your-own-api-gateway-developer-portal/

https://aws.amazon.com/blogs/compute/monetize-your-apis-in-aws-marketplace-using-api-gateway/

the relation API/Marketplace Product Code is considered as one-to-one.

The same is true for the developer portal code because catalog.json has an attribute usagePlanId and one swagger attribute (not many). The user interface also enforces subscriptions to a single API.
Is this intentionally or this is a flaw in the model?

It is not very practical to define the same API in the catalog.json multiple times, once per usagePlanId. How about usagePlanIds array?

It would be nice if customer can search for an API on the Marketplace and select the Usage Plan within the API selected. This is an approach taken by some other API Gateways on the market and it seems to be very convenient from user perspective.

Opinion?

Thank You

DynamoDB Integration

I see that you're using DynamoDB in the customers controller, but I don't see a config for that in any of the yamls. Can you clarify how that's being integrated?

Unable to locate credentials

Hi All,

I am trying to setup the AWS API Developer portal,I get prompt for account id,s3 bucket name,Cloud Formation name and the moment we input all the data we get error.
Steps we have followed are as below :
AWS CLI Setup and Configured
Node js Configured
aws configure --profile deeps
npm run win-setup
Error : Unable to Locate credentials.
Pls help.

Setup wizard variables not substituted in the AWS CLI commands

There is an error when I run the initial setup command:

npm run setup

[email protected] create-artifacts-bucket D:\Projects\AWS\aws-api-gateway-developer-portal
aws s3api get-bucket-location --bucket $npm_package_config_artifactsS3Bucket --region $npm_package_config_primaryAwsRegion || aws s3 mb s3://$npm_package_config_artifactsS3Bucket --region $npm_package_config_primaryAwsRegion

Invalid endpoint: https://s3.$npm_package_config_primaryAwsRegion.amazonaws.com
Invalid endpoint: https://s3.$npm_package_config_primaryAwsRegion.amazonaws.com

It seems the wizard variables are not substituted into the AWS CLI command.

My environment is:

AWS CLI: aws-cli/1.11.24 Python/2.7.9 Windows/8 botocore/1.4.81
Node: 4.4.7
Npm: 2.5.18

UI Not Rendering

UI was throwing HREF error. Appeared to be like issue #34.

Updated ./dev-portal package.json to "react-router-dom": "^4.1.1"

This corrected the issue.

Running on windoze
aws cli 1.11.100
npm 5.0.4

Please close the issue. I just wanted to share for others who may have similar issues.

Will not build on EC2

I launched a T2 Large Ubuntu Server 16.04 LTS instance on EC2, installed node & aws cli, and tried to run the setup but npm complains about missing files while uploading to s3. Is it possible I am missing a library or something?

...
upload: build/swagger-ui/dist/lib/swagger-oauth.js to s3://getlocodatum/swagger-ui/dist/lib/swagger-oauth.js
upload: build/swagger-ui/dist/swagger-ui.min.js to s3://getlocodatum/swagger-ui/dist/swagger-ui.min.js
upload: build/swagger-ui/dist/lang/ja.js to s3://getlocodatum/swagger-ui/dist/lang/ja.js
upload: build/swagger-ui/dist/lib/lodash.min.js to s3://getlocodatum/swagger-ui/dist/lib/lodash.min.js
upload: build/swagger-ui/dist/swagger-ui.js to s3://getlocodatum/swagger-ui/dist/swagger-ui.js
npm ERR! path xdg-open
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn xdg-open
npm ERR! enoent spawn xdg-open ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_827Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] post-setup: `npm run post-config && cd dev-portal && npm install && npm run upload-site && npm home`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] post-setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_841Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] setup: `npm install && npm run pre-config && npm run create-artifacts-bucket && npm run lambdas-npm-install && npm run package-deploy && npm run post-setup`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_853Z-debug.log
ubuntu@ip-172-31-29-194:~/aws-api-gateway-developer-portal$ cat /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_827Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'home' ]
2 info using [email protected]
3 info using [email protected]
4 silly docs [ '.' ]
5 silly getDoc .
6 verbose npm-session 1de6a37c14c77707
7 silly pacote directory manifest for undefined@file: fetched in 11ms
8 verbose stack Error: spawn xdg-open ENOENT
8 verbose stack     at _errnoException (util.js:1003:13)
8 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
8 verbose stack     at onErrorNT (internal/child_process.js:389:16)
8 verbose stack     at process._tickCallback (internal/process/next_tick.js:152:19)
9 verbose cwd /home/ubuntu/aws-api-gateway-developer-portal/dev-portal
10 verbose Linux 4.4.0-1049-aws
11 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "home"
12 verbose node v9.4.0
13 verbose npm  v5.6.0
14 error path xdg-open
15 error code ENOENT
16 error errno ENOENT
17 error syscall spawn xdg-open
18 error enoent spawn xdg-open ENOENT
19 error enoent This is related to npm not being able to find a file.
20 verbose exit [ 1, true ]
ubuntu@ip-172-31-29-194:~/aws-api-gateway-developer-portal$ cat /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_841Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'post-setup' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'post-setup' ]
5 info lifecycle [email protected]~post-setup: [email protected]
6 verbose lifecycle [email protected]~post-setup: unsafe-perm in lifecycle true
7 verbose lifecycle [email protected]~post-setup: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/aws-api-gateway-developer-portal/node_modules/.bin:/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/aws-api-gateway-developer-portal/node_modules/.bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
8 verbose lifecycle [email protected]~post-setup: CWD: /home/ubuntu/aws-api-gateway-developer-portal
9 silly lifecycle [email protected]~post-setup: Args: [ '-c',
9 silly lifecycle   'npm run post-config && cd dev-portal && npm install && npm run upload-site && npm home' ]
10 silly lifecycle [email protected]~post-setup: Returned: code: 1  signal: null
11 info lifecycle [email protected]~post-setup: Failed to exec post-setup script
12 verbose stack Error: [email protected] post-setup: `npm run post-config && cd dev-portal && npm install && npm run upload-site && npm home`
12 verbose stack Exit status 1
12 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
12 verbose stack     at EventEmitter.emit (events.js:160:13)
12 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
12 verbose stack     at ChildProcess.emit (events.js:160:13)
12 verbose stack     at maybeClose (internal/child_process.js:943:16)
12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
13 verbose pkgid [email protected]
14 verbose cwd /home/ubuntu/aws-api-gateway-developer-portal
15 verbose Linux 4.4.0-1049-aws
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "post-setup"
17 verbose node v9.4.0
18 verbose npm  v5.6.0
19 error code ELIFECYCLE
20 error errno 1
21 error [email protected] post-setup: `npm run post-config && cd dev-portal && npm install && npm run upload-site && npm home`
21 error Exit status 1
22 error Failed at the [email protected] post-setup script.
22 error This is probably not a problem with npm. There is likely additional logging output above.
23 verbose exit [ 1, true ]
ubuntu@ip-172-31-29-194:~/aws-api-gateway-developer-portal$ cat /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_853Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'setup' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'presetup', 'setup', 'postsetup' ]
5 info lifecycle [email protected]~presetup: [email protected]
6 info lifecycle [email protected]~setup: [email protected]
7 verbose lifecycle [email protected]~setup: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~setup: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ubuntu/aws-api-gateway-developer-portal/node_modules/.bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~setup: CWD: /home/ubuntu/aws-api-gateway-developer-portal
10 silly lifecycle [email protected]~setup: Args: [ '-c',
10 silly lifecycle   'npm install && npm run pre-config && npm run create-artifacts-bucket && npm run lambdas-npm-install && npm run package-deploy && npm run post-setup' ]
11 silly lifecycle [email protected]~setup: Returned: code: 1  signal: null
12 info lifecycle [email protected]~setup: Failed to exec setup script
13 verbose stack Error: [email protected] setup: `npm install && npm run pre-config && npm run create-artifacts-bucket && npm run lambdas-npm-install && npm run package-deploy && npm run post-setup`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at EventEmitter.emit (events.js:160:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:160:13)
13 verbose stack     at maybeClose (internal/child_process.js:943:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/ubuntu/aws-api-gateway-developer-portal
16 verbose Linux 4.4.0-1049-aws
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "setup"
18 verbose node v9.4.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] setup: `npm install && npm run pre-config && npm run create-artifacts-bucket && npm run lambdas-npm-install && npm run package-deploy && npm run post-setup`
22 error Exit status 1
23 error Failed at the [email protected] setup script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
ubuntu@ip-172-31-29-194:~/aws-api-gateway-developer-portal$ history
	1  sudo apt-get update
	2  sudo apt-get dist-upgrade -y
	3  curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
	4  sudo apt-get install -y build-essential nodejs python-pip
	5  sudo pip install --upgrade pip
	6  pip install awscli --upgrade --user
	7  aws --version
	8  aws configure
	9  sudo npm i -g npm
   10  sudo npm i -g n
   11  sudo n stable
   12  sudo chown -R $USER:$(id -gn $USER) /home/ubuntu/.config
   13  git clone https://github.com/awslabs/aws-api-gateway-developer-portal.git
   14  cd aws-api-gateway-developer-portal/
   15  npm run setup
   16  cat /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_827Z-debug.log
   17  cat /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_841Z-debug.log
   18  cat /home/ubuntu/.npm/_logs/2018-02-20T17_00_35_853Z-debug.log
   19  history
ubuntu@ip-172-31-29-194:~/aws-api-gateway-developer-portal$ 

Raising requests for getting API keys

How to take requests from third party developers for granting them access to gateway APIs instead of giving them an access key to try out the APIs. Any admin portal in AWS to approve these requests generated ?

Race condition with subscribe-success?

The way subscribe-success is implemented, it requires createMarketPlaceSubscription to be called first in order to set up the cognito id <-> customerId mapping. I see nothing in createMarketPlaceSubscription or subscribe-success that ensures this ordering.

What is the timing of subscribe-success being called? Does resolveCustomer trigger it? Is it just on some time delay after the customer presses subscribe in the portal?

A couple of feature requests

  • From an API ID and Plan ID, automatically download the swagger for the included APIs from the included stages.
  • Support for the AWS Extension ANY method (although I realize it's not particularly helpful as a Dev Portal "feature" to just shove out all known methods and let the dev crap-shoot around them :) ).

Unable to register/subscribe

I had to apply the changes based on #39

By applying the change in #39, I was able to deploy the portal successfully. However Register action did spin for ever although I could see the user in Congnito User pool, DevPortal successfully created.
Upon signin, it complained the user doesn't exist.
I applied the following to fix it (not sure why it worked):
$ npm run post-setup

Now I am facing two issues:

Unable to see PetStore API in API Gateway. Shouldn't it be created by running $ npm run setup
Unable to subscribe to PetStore API.

It would be great to have a fully functional live demo somewhere to try it out and understand the supported functionalities.

Out of the Box: Will not load API page

Hello.

I am trying to get my API up and available through this Developer Gateway. When I start from scratch (clone the repo as is), and run "npm run setup", the Developer Portal homepage shows up. However, the URL is

http://dpwa.s3-website-us-east-1.amazonaws.com/

and not

http://dpwa.s3-website.us-east-1.amazonaws.com/

This was an issue addressed in #57. It is also addressed in #54, but the solution from the second answer doesn't explain where they changed the website URL.

When I navigate to the /apis page, I have a few errors appear in the console.

screen shot 2017-09-22 at 3 47 49 pm

I am trying to find out if this is an error that has to do with the Buckets that I created in the "npm run setup" step or this is an error from the current branch.

I have followed the steps in both #57 and #54, doing only one or only the other, doing both, starting from scratch. No matter what I try, the API page will not load.

I appreciate any feedback.
Thank You

productCode tied to one usage plan?

From what I understand, when a purchase is made on the marketplace, the subscriber is tied to a single usage plan. Since the API is pay per request, initially I'd like to keep the customer at a reasonable request limit so they don't rack up a huge bill and then not pay. Over time as they've shown an ability to pay I'd like to move them up to a higher limit. However, since their subscription is tied to the initial usage plan this doesn't seem possible.

To get around this, it seems we could create a new usage plan/product code combination and somehow only give that customer access to it? But, then it seems that their old API key wouldn't migrate, which is a non-starter since the API key may be embedded in mobile app deployed in the wild.

Hopefully I'm misunderstanding the whole thing and the productCode isn't actually used for metering? Could it be that I can just move a subscribed customer to a new usage plan? Or can I have multiple usage plans with the same product code to get around this?

"Execution failed due to configuration error: Invalid permissions on Lambda function" seen when try to invoke "/catalog" API

Deployed the aws-api-gateway-developer-portal using master branch.

The welcome page loaded without any issue. But when trying to go to the APIs page following error occurs.
"axios.standalone.js:747 GET https://API_ID.execute-api.us-west-2.amazonaws.com/prod/catalog?start=undefined&end=undefined 502 ()"
"XMLHttpRequest cannot load https://API_ID.execute-api.us-west-2.amazonaws.com/prod/catalog?start=undefined&end=undefined. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://developer-portal-test-web-3.s3-website-us-west-2.amazonaws.com' is therefore not allowed access. The response had HTTP status code 502."

Then I tried to test the /catalog API manually in the aws API test console. Then bellow error came.

Thu Jan 25 06:47:10 UTC 2018 : Sending request to https://lambda.us-west-2.amazonaws.com/2015-03-31/functions/arn:aws:lambda:us-west-2:account_id:function:stage/invocations
Thu Jan 25 06:47:10 UTC 2018 : Execution failed due to configuration error: Invalid permissions on Lambda function
Thu Jan 25 06:47:10 UTC 2018 : Method completed with status: 500

What could be the issue here?

Simple admin panel

Hi,

Do you have plans about creating a simple admin panel for this very repo? It would be much nicer than the whole AWS interface.

Cannot have a working version following the readme

I am following the readme to have a working developer portal however it seems that I am facing an issue in the setup:

when I launch npm run setup after the process is complete the browser opens with the page:

http://MYPORTALNAME-app.s3-website-eu-central-1.amazonaws.com

and this one I get 404. The correct address would be instead:

http://MYPORTALNAME-app.s3-website.eu-central-1.amazonaws.com

At this address I can see at least the default page. [note that the empty one is using website-eu while the one that has content has website.eu]

The region I chose was "eu-central-1"

Also I cannot see the api if I go in this page:

http://MYPORTALNAME-app.s3-website.eu-central-1.amazonaws.com/apis and then I've some error in the console

apis:1 Uncaught (in promise) {data: "", status: 0, statusText: "", headers: {…}, config: {…}}config: {method: "GET", headers: {…}, timeout: 0, transformRequest: Array(1), transformResponse: Array(1), …}data: ""headers: {}status: 0statusText: ""proto: Object
Promise rejected (async)

steps that I did:

  • create a developer portal in amazon
  • clone this repository
  • change the index.js in the lambdas/backend/catalog/ and replaced : YOUR_USAGE_PLAN_ID with 'beta' the stage I used in the developer portal and 'YOUR_API_ID', with the one that I got between parenthesis on top of the page [see attached screenshot]
  • launched npm run setup
    selection_066

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.