Closed HimanshuShuklaCoder closed 2 years ago
Hi, Please follow the below steps to run this dev portal in windows local machine:
Steps:
$ aws configure
Once you hit enter you will have to add following information:
AWS Access Key ID:
Go to npm.js file present at "aws-api-gateway-developer-portal\scripts\npm.js" and replace "npm" at line number 11 to "npm.cmd" Your line number 11 in npm.js should be as follows:
==> Replace "YOUR_LAMBDA_ARTIFACTS_BUCKET_NAME" with your s3 bucket name ==> Replace "CUSTOM_PREFIX" with any prefix you like. (For example: test)
$ node run install release
This is the example sam deploy command:
$ sam deploy --template-file C:\Users\Administrator\Desktop\demo\aws-api-gateway-developer-portal\cloudformation\packaged.yaml --stack-name dev-portal0 --capabilities CAPABILITY_NAMED_IAM --parameter-overrides StaticAssetRebuildToken=XXXXXXXXXXX StaticAssetRebuildMode=overwrite-content DevPortalSiteS3BucketName=test-dev-portal-static-assets0 ArtifactsS3BucketName=test-dev-portal-artifacts0 DevPortalCustomersTableName=DevPortalCustomers0 DevPortalPreLoginAccountsTableName=DevPortalPreLoginAccounts0 DevPortalFeedbackTableName=DevPortalFeedback0 CognitoIdentityPoolName=DevPortalIdentityPool0 LocalDevelopmentMode=true CognitoDomainNameOrPrefix=test-auth0 —s3-bucket testbucket
Kindly replace the packaged.yaml to template.yaml. Following is the sample command that you should make:
$ sam deploy --template-file C:\Users\Administrator\Desktop\demo\aws-api-gateway-developer-portal\cloudformation\template.yaml --stack-name dev-portal0 --capabilities CAPABILITY_NAMED_IAM --parameter-overrides StaticAssetRebuildToken=XXXXXXXXXXX StaticAssetRebuildMode=overwrite-content DevPortalSiteS3BucketName=test-dev-portal-static-assets0 ArtifactsS3BucketName=test-dev-portal-artifacts0 DevPortalCustomersTableName=DevPortalCustomers0 DevPortalPreLoginAccountsTableName=DevPortalPreLoginAccounts0 DevPortalFeedbackTableName=DevPortalFeedback0 CognitoIdentityPoolName=DevPortalIdentityPool0 LocalDevelopmentMode=true CognitoDomainNameOrPrefix=test-auth0 —s3-bucket testbucket
Now run this command and you should see that the stack is being deployed.
Please note - that the configuration and names, given in the SAM deploy command should be same as you have given in the deployer.config.js file. Otherwise it will throw error.
Hi,
I am new to AWS and developer portal. I want to run the developer portal on my local machine and want to change the UI using react features. Every time i try to tun the developer portal it throws me the error - "TypeError: Cannot read property 'restApiId' of undefined" This is picked from window.config .restApiId. Can anyone could help me in setting up the code locally. Have added deployer.config file with correct entires corresponding to my AWS account