Enterprise DevOps & Cloud Infrastructure

AWS Security Credentials & Doppler CLI

Erik Reinert

Erik Reinert

TheAltF4Stream
Enterprise DevOps & Cloud Infrastructure

Check out a free preview of the full Enterprise DevOps & Cloud Infrastructure course

The "AWS Security Credentials & Doppler CLI" Lesson is part of the full, Enterprise DevOps & Cloud Infrastructure course featured in this preview video. Here's what you'd learn in this lesson:

Erik creates an AWS access key, which grants access to the AWS CLI. The access key is stored in Doppler with the other secrets. The Doppler CLI is set up and tested.

Preview
Close

Transcript from the "AWS Security Credentials & Doppler CLI" Lesson

[00:00:00]
>> So let's move on to the next thing we wanna do. Okay, so now after we've logged in, we want to go to Security Credentials. And so what we're gonna do is we're gonna go to the top right. We're gonna click Security Credentials. This is the part that gets scary.

[00:00:17]
Okay, cool, again, I have no idea what's in here. And then what we're gonna do is we're going to go to, where did I say it was? Access keys, yeah, okay. So you'll see here I have two access keys at the moment. And it's okay, these are fine.

[00:00:33]
It doesn't matter if these are shown. But these are basically my secret key IDs, right? So these are the keys that I've created on my account. And right now, you'll see I have one, or, I'm sorry, I have one that's been around for 260 days. And you can see it's even used S3, right?

[00:00:50]
And I've got another one, which is brand new, which is fem-eci. And that one was, actually, I haven't even used it yet, more than likely because I just used these credentials. What I'm gonna do is I'm gonna delete this really quickly. And we're gonna create a new one.

[00:01:08]
So I'm gonna hit Create access key. And the next thing I'm gonna do is I'm gonna click Command Line Interface cuz this access key, we don't really care about letting access to the command line, right? And it might say, hey, there's alternatives, that's fine. We're just gonna use what we want.

[00:01:21]
So we understand the above recommendation, and I wanna proceed with an access key. I'm gonna hit Next, and then I'm gonna give it a description. So I'll just say fem-eci, right? And then I'll click Create access key. Now, I have a brand new access key, right? And I have a secret key.

[00:01:38]
Now, I'm not gonna show the secret key, but just like we did with GitHub and Terraform, we're gonna go back to Doppler, and now we're gonna add our AWS credentials, right? So that's AWS_ACCESS_KEY_ID. Paste in your value. It's gonna be AWS_DEFAULT_REGION. For now, just do us-west-2 for me because I did everything in us-west-2 cuz I live in California.

[00:02:09]
[LAUGH] So for now, just do us-west-2 for me. And then AWS_SECRET_ACCESS_KEY, paste in your secret access key, like that. And then hit Save. Okay, so let's go ahead and jump back into it. So I wanna show you guys something really quickly, which is how to actually set up Doppler.

[00:02:32]
We want to make sure that Doppler can actually authenticate with itself. And so what we wanna do is we wanna type in doppler, and then if we hit Enter, we'll get what's called mand pages. These are basically just explaining, telling us what all we can do with the command line.

[00:02:49]
And if we look in here, we should see a couple that are kind of important. The first one is login. [LAUGH] So we actually wanna log into Doppler so that we can use our Doppler secrets. And so in that case, you do doppler login. Now, I already have access, right?

[00:03:03]
I'm already within whatever. So what you do is you'd actually then go through the process of signing into Doppler, and then you'd be returned back to the CLI. And so once you're done with that, then, again, you can open the authorization page in your browser. I'll do that.

[00:03:21]
Now, I have a SAML provider, so it's gonna actually make me go through two, or what is it called? One, three-factor, whatever it is. Let me move this off for just a second. And then what you'll notice is you'll see that you have an auth code that's provided to you, right?

[00:03:38]
And so this auth code is what you're actually going to use to paste into Doppler so that you can log in, right? So once you do that, I'll move this off to the side, or here, let's copy this, paste that, hit Next, please don't, okay, cool, Finish Login.

[00:03:59]
Manage Tokens, and there you go. You can see I've got my new token here, and I should be logged in, and it says welcome, Erik, right? The second thing I wanna do is I actually wanna do doppler setup, right? So doppler setup makes it so that I can choose a default environment to work in or a default project to work in.

[00:04:18]
And so in this case, you'll see I have a ton of them. But if I scroll down, I'm gonna go to my default project for me, which is my name. Again, it might be example project for you, it might be something else, but we hit Enter, and then it'll tell us what it loaded.

[00:04:32]
So before when we did doppler run, blah, blah, blah, blah, now, all we really have to do is aws s3 ls, go back here. I don't have a backspace on this keyboard. Never mind [LAUGH] one second, there we go. Get rid of all of this now. And then that should work on its own, bam, right?

[00:04:57]
Makes it a little easier. You don't have to put in as many things. And the real point was I just wanted you to see the flexibility with the CLI. And how I wanted to get you thinking exactly the way you were thinking, of, cool, I can use this for local development, but what else can I use this for?

[00:05:14]
Could I have this in pipelines? Could this be something that runs my service, right? So again, that's really the big reason why we do that. But, yeah, I would say save yourself some time and do the doppler login and doppler setup.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now