Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to simply provide AWS key and secret ? #1

Open
davidt-gh opened this issue Jan 21, 2025 · 4 comments
Open

How to simply provide AWS key and secret ? #1

davidt-gh opened this issue Jan 21, 2025 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@davidt-gh
Copy link

I want to use this exporter, but not sure how to use exporter-toolkit
Why not use simple aws keys? is this not possible?

@nielznl
Copy link

nielznl commented Jan 22, 2025

The exporter can be configured with AWS keys as shown in specifying credentials, the following piece of code loads the credentials:

// Initialize a session that the SDK uses to load
// credentials from the shared credentials file ~/.aws/credentials
// and configuration from the shared configuration file ~/.aws/config.
sess := session.Must(session.NewSessionWithOptions(session.Options{
	SharedConfigState: session.SharedConfigEnable,
}))

The exporter-toolkit only needs to be configured if for example TLS or authentication is required.

Let me know if you get it working or run into something else.

@roaldnefs roaldnefs added help wanted Extra attention is needed question Further information is requested and removed help wanted Extra attention is needed labels Jan 22, 2025
@davidt-gh
Copy link
Author

Nice, it working.
What if I want to run this as a pod on EKS cluster and use IAM Role? It will create me an access token, but is this code will work to use it?
I've created docker to support it: https://github.com/davidt-gh/ses_exporter

@nielznl
Copy link

nielznl commented Jan 22, 2025

specifying credentials

Does mention IAM role for Amazon EC2, so I believe it should work.

@davidt-gh
Copy link
Author

I think better to use this:
https://docs.aws.amazon.com/eks/latest/userguide/pod-configuration.html

The pod does not have ~/.aws:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants