You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/partials/aws-s3-credentials.adoc
+37-7Lines changed: 37 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
-
. Ensure that the AWS CLI is installed and configured with the necessary credentials.
2
-
.. Install the AWS CLI by following the instructions in the AWS official documentation -- link:https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html[Install the AWS CLI version 2].
3
-
.. Use `aws configure` command to set your `aws_access_key_id` and `aws_secret_access_key` from AWS.
4
-
.. Create an S3 bucket and a directory to store the backup files using the AWS CLI:
1
+
2
+
. Install the AWS CLI by following the instructions in the AWS official documentation -- link:https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html[Install the AWS CLI version 2].
3
+
. Create an S3 bucket and a directory to store the backup files using the AWS CLI:
For more information on how to create a bucket and use the AWS CLI, see the AWS official documentation -- link:https://docs.aws.amazon.com/cli/latest/userguide/cli-services-s3-commands.html#using-s3-commands-prereqs[Use Amazon S3 with the AWS CLI] and link:https://docs.aws.amazon.com/cli/latest/userguide/cli-services-s3.html[Use high-level (s3) commands with the AWS CLI].
13
-
.. Verify that the `~/.aws/config` is correct by running the following command:
12
+
. Verify that the `~/.aws/config` file is correct by running the following command:
14
13
+
15
14
[source,shell]
16
15
----
@@ -21,9 +20,12 @@ The output should look like this:
21
20
[result,shell]
22
21
----
23
22
[default]
24
-
region=eu-north-1
23
+
region=us-east-1
25
24
----
26
-
.. Verify that the `~/.aws/credentials` is correct:
25
+
. Configure the access to your AWS S3 bucket by setting the `aws_access_key_id` and `aws_secret_access_key` in the `~/.aws/credentials` file and, if needed, using a bucket policy.
26
+
For example:
27
+
28
+
.. Use `aws configure set aws_access_key_id aws_secret_access_key` command to set your IAM credentials from AWS and verify that the `~/.aws/credentials` is correct:
27
29
+
28
30
[source,shell]
29
31
----
@@ -36,4 +38,32 @@ The output should look like this:
36
38
[default]
37
39
aws_access_key_id=this.is.secret
38
40
aws_secret_access_key=this.is.super.secret
41
+
----
42
+
43
+
.. Additionally, you can use a resource-based policy to grant access permissions to your S3 bucket and the objects in it.
44
+
Create a policy document with the following content and attach it to the bucket.
45
+
Note that both resource entries are important to be able to download and upload files.
0 commit comments