Help needed with installation

251 views
Skip to first unread message

Vikas Tharyani

unread,
Feb 9, 2022, 4:10:21 AM2/9/22
to Cloud Carbon Footprint
Hi Team

First, let me talk about the current setup we have, we have a top-level AWS org account that receives the cost and usage reports. The access to this account is given to me by an IAM role, so in order to login to the org account, I have to log in to another account and assume the role to the organization account (via Console or CLI both works).

I am trying to deploy the app on my local workstation, now the docs are confusing me in the below steps.

  • Ensure your AWS account has the correct permissions. - You will need an [IAM user](https://aws.amazon.com/premiumsupport/knowledge-center/create-access-key/) that can create access-keys and modify your billing settings. - Our organization does not allow the creation of IAM users and what will be modified in the billing settings, I do not want to modify anything in the existing setup since this is controlled by a different team.
  • Enter AWS role name: I am assuming this, this role is the target's account IAM role which allows access to S3(bucket having reports) and athena db, is my assumption correct?

Please help me unblock on above two concerns/issues.

Cloud Carbon Footprint

unread,
Feb 9, 2022, 5:29:33 PM2/9/22
to Cloud Carbon Footprint
Hi Vikas,

Thanks for reaching out! So actually to run the app, you do not need to create a new IAM User so we should actually update that documentation.

Also, your assumptions are correct. When you assume the target role, that role will have the permissions to access the services you laid out.

If you have already assumed the target role via CLI, you should be able to use the default mode for AWS_AUTH_MODE. Otherwise, you can set the mode to 'AWS' and set AWS_TARGET_ACCOUNT_ROLE_NAME to the target role to be assumed.

Thanks,
Cam

Vikas Tharyani

unread,
Feb 16, 2022, 10:04:23 AM2/16/22
to Cloud Carbon Footprint
Thanks for clarification, let me try the default mode and see how it goes.

Vikas Tharyani

unread,
Feb 16, 2022, 10:09:04 AM2/16/22
to Cloud Carbon Footprint
Hey Cam

I tried with the default mode set for AWS auth. The cli role I am using on my local workstation has Admin access to the account so I am pretty sure nothing is wrong in IAM permissions.
I am getting this error while launching the app.

[0] Files successfully emitted, waiting for typecheck results...
[0] Issues checking in progress...
[0] Proxy error: Could not proxy request /api/regions/emissions-factors from localhost:3000 to http://localhost:4000.
[0] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
[0]
[0] Proxy error: Could not proxy request /api/footprint?start=2021-02-16&end=2022-02-16&ignoreCache=false from localhost:3000 to http://localhost:4000.
[0] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
[0]
[0] No issues found.
[1] 2022-02-16T15:01:57.644Z [server] info: Cloud Carbon Footprint Server listening at http://localhost:4000

Here is a snapshot of my config (masking sensitive info with 'x')

AWS_USE_BILLING_DATA=true
AWS_BILLING_ACCOUNT_ID=093xxxxxxxxxx
AWS_BILLING_ACCOUNT_NAME=xxxxxxxxxxxx
AWS_ATHENA_REGION=us-west-2
AWS_ATHENA_DB_NAME=athenacurcfn_vtharyani_cu_report
AWS_ATHENA_DB_TABLE=AWSCURReportStatusTable
AWS_ATHENA_QUERY_RESULT_LOCATION=s3://xxxxxxxxx
AWS_AUTH_MODE=default


Vikas Tharyani

unread,
Feb 21, 2022, 4:29:25 AM2/21/22
to Cloud Carbon Footprint
Hey Cam

I tried with the default mode set for AWS auth. The cli role I am using on my local workstation has Admin access to the account so I am pretty sure nothing is wrong in IAM permissions.
I am getting this error while launching the app.

[0] Files successfully emitted, waiting for typecheck results...
[0] Issues checking in progress...
[0] Proxy error: Could not proxy request /api/regions/emissions-factors from localhost:3000 to http://localhost:4000.
[0] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
[0]
[0] Proxy error: Could not proxy request /api/footprint?start=2021-02-16&end=2022-02-16&ignoreCache=false from localhost:3000 to http://localhost:4000.
[0] See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
[0]
[0] No issues found.
[1] 2022-02-16T15:01:57.644Z [server] info: Cloud Carbon Footprint Server listening at http://localhost:4000

Here is a snapshot of my config (masking sensitive info with 'x')

AWS_USE_BILLING_DATA=true
AWS_BILLING_ACCOUNT_ID=093xxxxxxxxxx
AWS_BILLING_ACCOUNT_NAME=xxxxxxxxxxxx
AWS_ATHENA_REGION=us-west-2
AWS_ATHENA_DB_NAME=athenacurcfn_vtharyani_cu_report
AWS_ATHENA_DB_TABLE=AWSCURReportStatusTable
AWS_ATHENA_QUERY_RESULT_LOCATION=s3://xxxxxxxxx
AWS_AUTH_MODE=default

On Thursday, February 10, 2022 at 3:59:33 AM UTC+5:30 Cloud Carbon Footprint wrote:

Cloud Carbon Footprint

unread,
Feb 22, 2022, 2:59:34 PM2/22/22
to Cloud Carbon Footprint
Hi Vikas,

Thanks for sending. How are you starting the data? Is using a `yarn start` from the root? Or are you specifically starting in the api directory? If from the root, the front end should also load up on localhost:3000 and you should be able to refresh that page with the results. If you are running from the api directory, you will have to send a request through to localhost:4000/api/footprint with start and end date url parameters, as well as any other optional params like groupBy=day. When the app is running on localhost:3000 when the client has been started, it will make a proxy request to get the data from localhost:4000.

Thanks,
Cam

Vikas Tharyani

unread,
Feb 23, 2022, 1:53:13 AM2/23/22
to Cloud Carbon Footprint
Hi Cam

Thanks for your response, I am running the app from the root using the command yarn start. Do you think am I missing something in the configuration?

Gabriela Cordeiro

unread,
May 17, 2023, 9:12:02 AM5/17/23
to Cloud Carbon Footprint
I'm facing the same issue, I'm running from the root.

Cloud Carbon Footprint

unread,
Jun 20, 2023, 3:01:58 PM6/20/23
to Cloud Carbon Footprint

Hello - Could you please open an issue on our github page and describe more details on the error message you are seeing in our Bug Report template?

Thanks,

The Cloud Carbon Footprint team at Thoughtworks
Reply all
Reply to author
Forward
0 new messages