Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .doc_gen/metadata/iam_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3355,15 +3355,13 @@ iam_Scenario_GroupBasics:
iam: {AddUserToGroup, CreateGroup, CreateUser, CreateAccessKey, CreateRole, CreatePolicy, AttachRolePolicy, PutGroupPolicy,
DeleteGroup, DeleteGroupPolicy, DeleteAccessKey, DeleteUser, RemoveUserFromGroup}
iam_Scenario_CreateUserAssumeRole:
title: Create an &IAM-user; and assume a role with &STS; using an &AWS; SDK
title_abbrev: Create a user and assume a role
synopsis: create a user and assume a role. &aws_sec_sdk_use-federation-warning;
synopsis_list:
- Create a user with no permissions.
- Create a role that grants permission to list &S3; buckets for the account.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.
category: Scenarios
category: Basics
languages:
.NET:
versions:
Expand Down
26 changes: 13 additions & 13 deletions aws-cli/bash-linux/iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `aws-c
<!--custom.prerequisites.start-->
<!--custom.prerequisites.end-->

### Basics

Code examples that show you how to perform the essential operations within a service.

- [Learn the basics](iam_create_user_assume_role_scenario.sh)


### Single actions

Code excerpts that show you how to call individual service functions.
Expand All @@ -47,13 +54,6 @@ Code excerpts that show you how to call individual service functions.
- [ListAccessKeys](iam_operations.sh#L273)
- [ListUsers](iam_operations.sh#L56)

### Scenarios

Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.

- [Create a user and assume a role](iam_create_user_assume_role_scenario.sh)


<!--custom.examples.start-->
<!--custom.examples.end-->
Expand All @@ -67,8 +67,7 @@ functions within the same service.
<!--custom.instructions.end-->



#### Create a user and assume a role
#### Learn the basics

This example shows you how to create a user and assume a role.

Expand All @@ -77,12 +76,13 @@ This example shows you how to create a user and assume a role.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.end-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.basics.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basics.iam_Scenario_CreateUserAssumeRole.end-->

<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.end-->

### Tests

Expand Down
26 changes: 13 additions & 13 deletions cpp/example_code/iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ Next, for information on code example structures and how to build and run the ex
- [Hello IAM](hello_iam/CMakeLists.txt#L4) (`ListPolicies`)


### Basics

Code examples that show you how to perform the essential operations within a service.

- [Learn the basics](iam_create_user_assume_role_scenario.cpp)


### Single actions

Code excerpts that show you how to call individual service functions.
Expand Down Expand Up @@ -71,13 +78,6 @@ Code excerpts that show you how to call individual service functions.
- [UpdateServerCertificate](update_server_certificate.cpp#L35)
- [UpdateUser](update_user.cpp#L37)

### Scenarios

Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.

- [Create a user and assume a role](iam_create_user_assume_role_scenario.cpp)


<!--custom.examples.start-->
<!--custom.examples.end-->
Expand Down Expand Up @@ -107,8 +107,7 @@ folder.
This example shows you how to get started using IAM.



#### Create a user and assume a role
#### Learn the basics

This example shows you how to create a user and assume a role.

Expand All @@ -117,12 +116,13 @@ This example shows you how to create a user and assume a role.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.end-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.basics.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basics.iam_Scenario_CreateUserAssumeRole.end-->

<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.end-->

### Tests

Expand Down
40 changes: 23 additions & 17 deletions dotnetv3/IAM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `dotnetv3
- [Hello IAM](Actions/HelloIAM.cs#L4) (`ListPolicies`)


### Basics

Code examples that show you how to perform the essential operations within a service.

- [Learn the basics](Scenarios/IAMBasics/IAMBasics.cs)


### Single actions

Code excerpts that show you how to call individual service functions.
Expand Down Expand Up @@ -79,7 +86,6 @@ functions within the same service.

- [Build and manage a resilient service](../cross-service/ResilientService/ResilientServiceWorkflow/ResilientServiceWorkflow.cs)
- [Create a group and add a user](Scenarios/IamScenariosCommon/S3Wrapper.cs)
- [Create a user and assume a role](Scenarios/IAMBasics/IAMBasics.cs)


<!--custom.examples.start-->
Expand Down Expand Up @@ -116,6 +122,22 @@ To run the examples, see the [README](../README.md#building-and-running-the-code
This example shows you how to get started using IAM.


#### Learn the basics

This example shows you how to create a user and assume a role.

- Create a user with no permissions.
- Create a role that grants permission to list Amazon S3 buckets for the account.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.basics.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basics.iam_Scenario_CreateUserAssumeRole.end-->


#### Build and manage a resilient service

Expand Down Expand Up @@ -150,22 +172,6 @@ This example shows you how to do the following:
<!--custom.scenarios.iam_Scenario_GroupBasics.start-->
<!--custom.scenarios.iam_Scenario_GroupBasics.end-->

#### Create a user and assume a role

This example shows you how to create a user and assume a role.

- Create a user with no permissions.
- Create a role that grants permission to list Amazon S3 buckets for the account.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.end-->

### Tests

⚠ Running tests might result in charges to your AWS account.
Expand Down
26 changes: 13 additions & 13 deletions gov2/iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` fo
- [Hello IAM](hello/hello.go#L4) (`ListPolicies`)


### Basics

Code examples that show you how to perform the essential operations within a service.

- [Learn the basics](scenarios/scenario_assume_role.go)


### Single actions

Code excerpts that show you how to call individual service functions.
Expand Down Expand Up @@ -66,13 +73,6 @@ Code excerpts that show you how to call individual service functions.
- [ListUsers](actions/users.go#L29)
- [PutUserPolicy](actions/users.go#L92)

### Scenarios

Code examples that show you how to accomplish a specific task by calling multiple
functions within the same service.

- [Create a user and assume a role](scenarios/scenario_assume_role.go)


<!--custom.examples.start-->
<!--custom.examples.end-->
Expand Down Expand Up @@ -101,8 +101,7 @@ and to get help for running a scenario, use the following command:
```
go run ./cmd -h
```

#### Create a user and assume a role
#### Learn the basics

This example shows you how to create a user and assume a role.

Expand All @@ -111,12 +110,13 @@ This example shows you how to create a user and assume a role.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.end-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.basics.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basics.iam_Scenario_CreateUserAssumeRole.end-->

<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.end-->

### Tests

Expand Down
40 changes: 23 additions & 17 deletions javascriptv3/example_code/iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javas
- [Hello IAM](hello.js#L6) (`ListPolicies`)


### Basics

Code examples that show you how to perform the essential operations within a service.

- [Learn the basics](scenarios/basic.js)


### Single actions

Code excerpts that show you how to call individual service functions.
Expand Down Expand Up @@ -88,7 +95,6 @@ Code examples that show you how to accomplish a specific task by calling multipl
functions within the same service.

- [Build and manage a resilient service](../cross-services/wkflw-resilient-service/index.js)
- [Create a user and assume a role](scenarios/basic.js)


<!--custom.examples.start-->
Expand Down Expand Up @@ -135,6 +141,22 @@ This example shows you how to get started using IAM.
node ./hello.js
```

#### Learn the basics

This example shows you how to create a user and assume a role.

- Create a user with no permissions.
- Create a role that grants permission to list Amazon S3 buckets for the account.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.basics.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basics.iam_Scenario_CreateUserAssumeRole.end-->


#### Build and manage a resilient service

Expand All @@ -154,22 +176,6 @@ This example shows you how to create a load-balanced web service that returns bo
<!--custom.scenarios.cross_ResilientService.start-->
<!--custom.scenarios.cross_ResilientService.end-->

#### Create a user and assume a role

This example shows you how to create a user and assume a role.

- Create a user with no permissions.
- Create a role that grants permission to list Amazon S3 buckets for the account.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.end-->

### Tests

⚠ Running tests might result in charges to your AWS account.
Expand Down
40 changes: 23 additions & 17 deletions javav2/example_code/iam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ For prerequisites, see the [README](../../README.md#Prerequisites) in the `javav
- [Hello IAM](src/main/java/com/example/iam/HelloIAM.java#L6) (`ListPolicies`)


### Basics

Code examples that show you how to perform the essential operations within a service.

- [Learn the basics](src/main/java/com/example/iam/IAMScenario.java)


### Single actions

Code excerpts that show you how to call individual service functions.
Expand Down Expand Up @@ -61,7 +68,6 @@ Code examples that show you how to accomplish a specific task by calling multipl
functions within the same service.

- [Build and manage a resilient service](../../usecases/resilient_service/src/main/java/com/example/resilient/Main.java)
- [Create a user and assume a role](src/main/java/com/example/iam/IAMScenario.java)
- [Work with the IAM Policy Builder API](src/main/java/com/example/iam/IamPolicyBuilderExamples.java)


Expand All @@ -81,6 +87,22 @@ functions within the same service.
This example shows you how to get started using IAM.


#### Learn the basics

This example shows you how to create a user and assume a role.

- Create a user with no permissions.
- Create a role that grants permission to list Amazon S3 buckets for the account.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basic_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.basics.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.basics.iam_Scenario_CreateUserAssumeRole.end-->


#### Build and manage a resilient service

Expand All @@ -100,22 +122,6 @@ This example shows you how to create a load-balanced web service that returns bo
<!--custom.scenarios.cross_ResilientService.start-->
<!--custom.scenarios.cross_ResilientService.end-->

#### Create a user and assume a role

This example shows you how to create a user and assume a role.

- Create a user with no permissions.
- Create a role that grants permission to list Amazon S3 buckets for the account.
- Add a policy to let the user assume the role.
- Assume the role and list S3 buckets using temporary credentials, then clean up resources.

<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenario_prereqs.iam_Scenario_CreateUserAssumeRole.end-->


<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.start-->
<!--custom.scenarios.iam_Scenario_CreateUserAssumeRole.end-->

#### Work with the IAM Policy Builder API

This example shows you how to do the following:
Expand Down
Loading
Loading