From the course: AWS for DevOps: Security, Governance, and Validation
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
AWS SDK for security - Amazon Web Services (AWS) Tutorial
From the course: AWS for DevOps: Security, Governance, and Validation
AWS SDK for security
- [Narrator] So now that we've got everything set up, we're going to go ahead and use the SDK. And we're going to start with the typical pattern, which is list the buckets in S3. And just for a visual, in S3, we have these three buckets. So line one, we're requiring the AWS-SDK. Line two, we're updating the configuration to specify the region of interest. In line four, we are creating an S3 object. Line six is the key line. On the S3 object, we're calling the list buckets method, and in the node style, we're passing in an anonymous function with err and data. And we're just returning an error, if there's some error, otherwise we're just console logging out the result. So let's switch over to our terminal and run this. I'm just going to clear the screen and check the directory, and list the files. And so we want to list the bucket, so we're going to type node, and then auto complete. And we expect to see the buckets. And we get a little bit more meta data. We get to see when this was…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Console tools for cost control4m 7s
-
(Locked)
Total service costs for AWS3m 9s
-
(Locked)
Using the AWS billing dashboard4m 27s
-
(Locked)
CloudWatch for security and cost control6m 41s
-
(Locked)
Using CloudTrail logs for security5m 48s
-
(Locked)
CloudTrail and CloudWatch events3m 40s
-
(Locked)
Set up and use the AWS CLI or aws-shell5m 36s
-
(Locked)
AWS CLI for governance6m 30s
-
(Locked)
Setting up the AWS SDK for Node.js4m 6s
-
(Locked)
AWS SDK for security4m 56s
-
-
-