awscli 1.38.7__py3-none-any.whl → 1.38.8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of awscli might be problematic. Click here for more details.
- awscli/__init__.py +1 -1
- awscli/examples/cloudformation/_package_description.rst +1 -1
- awscli/examples/emr/add-steps.rst +8 -8
- awscli/examples/emr/create-cluster-examples.rst +5 -5
- awscli/examples/rds/cancel-export-task.rst +22 -22
- awscli/examples/rds/describe-export-tasks.rst +40 -40
- awscli/examples/rds/restore-db-cluster-from-s3.rst +64 -64
- awscli/examples/rds/start-export-task.rst +26 -26
- awscli/examples/s3/_concepts.rst +2 -2
- awscli/examples/s3/cp.rst +30 -30
- awscli/examples/s3/ls.rst +7 -7
- awscli/examples/s3/mb.rst +6 -6
- awscli/examples/s3/mv.rst +21 -21
- awscli/examples/s3/rb.rst +8 -8
- awscli/examples/s3/rm.rst +12 -12
- awscli/examples/s3/sync.rst +27 -27
- awscli/examples/s3api/get-bucket-policy.rst +2 -2
- {awscli-1.38.7.dist-info → awscli-1.38.8.dist-info}/METADATA +2 -2
- {awscli-1.38.7.dist-info → awscli-1.38.8.dist-info}/RECORD +27 -27
- {awscli-1.38.7.data → awscli-1.38.8.data}/scripts/aws +0 -0
- {awscli-1.38.7.data → awscli-1.38.8.data}/scripts/aws.cmd +0 -0
- {awscli-1.38.7.data → awscli-1.38.8.data}/scripts/aws_bash_completer +0 -0
- {awscli-1.38.7.data → awscli-1.38.8.data}/scripts/aws_completer +0 -0
- {awscli-1.38.7.data → awscli-1.38.8.data}/scripts/aws_zsh_completer.sh +0 -0
- {awscli-1.38.7.dist-info → awscli-1.38.8.dist-info}/LICENSE.txt +0 -0
- {awscli-1.38.7.dist-info → awscli-1.38.8.dist-info}/WHEEL +0 -0
- {awscli-1.38.7.dist-info → awscli-1.38.8.dist-info}/top_level.txt +0 -0
awscli/examples/s3/cp.rst
CHANGED
|
@@ -3,67 +3,67 @@
|
|
|
3
3
|
The following ``cp`` command copies a single file to a specified
|
|
4
4
|
bucket and key::
|
|
5
5
|
|
|
6
|
-
aws s3 cp test.txt s3://
|
|
6
|
+
aws s3 cp test.txt s3://amzn-s3-demo-bucket/test2.txt
|
|
7
7
|
|
|
8
8
|
Output::
|
|
9
9
|
|
|
10
|
-
upload: test.txt to s3://
|
|
10
|
+
upload: test.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
11
11
|
|
|
12
12
|
**Example 2: Copying a local file to S3 with an expiration date**
|
|
13
13
|
|
|
14
14
|
The following ``cp`` command copies a single file to a specified
|
|
15
15
|
bucket and key that expires at the specified ISO 8601 timestamp::
|
|
16
16
|
|
|
17
|
-
aws s3 cp test.txt s3://
|
|
17
|
+
aws s3 cp test.txt s3://amzn-s3-demo-bucket/test2.txt \
|
|
18
18
|
--expires 2014-10-01T20:30:00Z
|
|
19
19
|
|
|
20
20
|
Output::
|
|
21
21
|
|
|
22
|
-
upload: test.txt to s3://
|
|
22
|
+
upload: test.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
23
23
|
|
|
24
24
|
**Example 3: Copying a file from S3 to S3**
|
|
25
25
|
|
|
26
26
|
The following ``cp`` command copies a single s3 object to a specified bucket and key::
|
|
27
27
|
|
|
28
|
-
aws s3 cp s3://
|
|
28
|
+
aws s3 cp s3://amzn-s3-demo-bucket/test.txt s3://amzn-s3-demo-bucket/test2.txt
|
|
29
29
|
|
|
30
30
|
Output::
|
|
31
31
|
|
|
32
|
-
copy: s3://
|
|
32
|
+
copy: s3://amzn-s3-demo-bucket/test.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
33
33
|
|
|
34
34
|
**Example 4: Copying an S3 object to a local file**
|
|
35
35
|
|
|
36
36
|
The following ``cp`` command copies a single object to a specified file locally::
|
|
37
37
|
|
|
38
|
-
aws s3 cp s3://
|
|
38
|
+
aws s3 cp s3://amzn-s3-demo-bucket/test.txt test2.txt
|
|
39
39
|
|
|
40
40
|
Output::
|
|
41
41
|
|
|
42
|
-
download: s3://
|
|
42
|
+
download: s3://amzn-s3-demo-bucket/test.txt to test2.txt
|
|
43
43
|
|
|
44
44
|
**Example 5: Copying an S3 object from one bucket to another**
|
|
45
45
|
|
|
46
46
|
The following ``cp`` command copies a single object to a specified bucket while retaining its original name::
|
|
47
47
|
|
|
48
|
-
aws s3 cp s3://
|
|
48
|
+
aws s3 cp s3://amzn-s3-demo-bucket/test.txt s3://amzn-s3-demo-bucket2/
|
|
49
49
|
|
|
50
50
|
Output::
|
|
51
51
|
|
|
52
|
-
copy: s3://
|
|
52
|
+
copy: s3://amzn-s3-demo-bucket/test.txt to s3://amzn-s3-demo-bucket2/test.txt
|
|
53
53
|
|
|
54
54
|
**Example 6: Recursively copying S3 objects to a local directory**
|
|
55
55
|
|
|
56
56
|
When passed with the parameter ``--recursive``, the following ``cp`` command recursively copies all objects under a
|
|
57
|
-
specified prefix and bucket to a specified directory. In this example, the bucket ``
|
|
57
|
+
specified prefix and bucket to a specified directory. In this example, the bucket ``amzn-s3-demo-bucket`` has the objects
|
|
58
58
|
``test1.txt`` and ``test2.txt``::
|
|
59
59
|
|
|
60
|
-
aws s3 cp s3://
|
|
60
|
+
aws s3 cp s3://amzn-s3-demo-bucket . \
|
|
61
61
|
--recursive
|
|
62
62
|
|
|
63
63
|
Output::
|
|
64
64
|
|
|
65
|
-
download: s3://
|
|
66
|
-
download: s3://
|
|
65
|
+
download: s3://amzn-s3-demo-bucket/test1.txt to test1.txt
|
|
66
|
+
download: s3://amzn-s3-demo-bucket/test2.txt to test2.txt
|
|
67
67
|
|
|
68
68
|
**Example 7: Recursively copying local files to S3**
|
|
69
69
|
|
|
@@ -71,51 +71,51 @@ When passed with the parameter ``--recursive``, the following ``cp`` command rec
|
|
|
71
71
|
specified directory to a specified bucket and prefix while excluding some files by using an ``--exclude`` parameter. In
|
|
72
72
|
this example, the directory ``myDir`` has the files ``test1.txt`` and ``test2.jpg``::
|
|
73
73
|
|
|
74
|
-
aws s3 cp myDir s3://
|
|
74
|
+
aws s3 cp myDir s3://amzn-s3-demo-bucket/ \
|
|
75
75
|
--recursive \
|
|
76
76
|
--exclude "*.jpg"
|
|
77
77
|
|
|
78
78
|
Output::
|
|
79
79
|
|
|
80
|
-
upload: myDir/test1.txt to s3://
|
|
80
|
+
upload: myDir/test1.txt to s3://amzn-s3-demo-bucket/test1.txt
|
|
81
81
|
|
|
82
82
|
**Example 8: Recursively copying S3 objects to another bucket**
|
|
83
83
|
|
|
84
84
|
When passed with the parameter ``--recursive``, the following ``cp`` command recursively copies all objects under a
|
|
85
85
|
specified bucket to another bucket while excluding some objects by using an ``--exclude`` parameter. In this example,
|
|
86
|
-
the bucket ``
|
|
86
|
+
the bucket ``amzn-s3-demo-bucket`` has the objects ``test1.txt`` and ``another/test1.txt``::
|
|
87
87
|
|
|
88
|
-
aws s3 cp s3://
|
|
88
|
+
aws s3 cp s3://amzn-s3-demo-bucket/ s3://amzn-s3-demo-bucket2/ \
|
|
89
89
|
--recursive \
|
|
90
90
|
--exclude "another/*"
|
|
91
91
|
|
|
92
92
|
Output::
|
|
93
93
|
|
|
94
|
-
copy: s3://
|
|
94
|
+
copy: s3://amzn-s3-demo-bucket/test1.txt to s3://amzn-s3-demo-bucket2/test1.txt
|
|
95
95
|
|
|
96
96
|
You can combine ``--exclude`` and ``--include`` options to copy only objects that match a pattern, excluding all others::
|
|
97
97
|
|
|
98
|
-
aws s3 cp s3://
|
|
98
|
+
aws s3 cp s3://amzn-s3-demo-bucket/logs/ s3://amzn-s3-demo-bucket2/logs/ \
|
|
99
99
|
--recursive \
|
|
100
100
|
--exclude "*" \
|
|
101
101
|
--include "*.log"
|
|
102
102
|
|
|
103
103
|
Output::
|
|
104
104
|
|
|
105
|
-
copy: s3://
|
|
106
|
-
copy: s3://
|
|
105
|
+
copy: s3://amzn-s3-demo-bucket/logs/test/test.log to s3://amzn-s3-demo-bucket2/logs/test/test.log
|
|
106
|
+
copy: s3://amzn-s3-demo-bucket/logs/test3.log to s3://amzn-s3-demo-bucket2/logs/test3.log
|
|
107
107
|
|
|
108
108
|
**Example 9: Setting the Access Control List (ACL) while copying an S3 object**
|
|
109
109
|
|
|
110
110
|
The following ``cp`` command copies a single object to a specified bucket and key while setting the ACL to
|
|
111
111
|
``public-read-write``::
|
|
112
112
|
|
|
113
|
-
aws s3 cp s3://
|
|
113
|
+
aws s3 cp s3://amzn-s3-demo-bucket/test.txt s3://amzn-s3-demo-bucket/test2.txt \
|
|
114
114
|
--acl public-read-write
|
|
115
115
|
|
|
116
116
|
Output::
|
|
117
117
|
|
|
118
|
-
copy: s3://
|
|
118
|
+
copy: s3://amzn-s3-demo-bucket/test.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
119
119
|
|
|
120
120
|
Note that if you're using the ``--acl`` option, ensure that any associated IAM
|
|
121
121
|
policies include the ``"s3:PutObjectAcl"`` action::
|
|
@@ -138,7 +138,7 @@ Output::
|
|
|
138
138
|
"s3:PutObjectAcl"
|
|
139
139
|
],
|
|
140
140
|
"Resource": [
|
|
141
|
-
"arn:aws:s3:::
|
|
141
|
+
"arn:aws:s3:::amzn-s3-demo-bucket/*"
|
|
142
142
|
],
|
|
143
143
|
"Effect": "Allow",
|
|
144
144
|
"Sid": "Stmt1234567891234"
|
|
@@ -152,11 +152,11 @@ Output::
|
|
|
152
152
|
The following ``cp`` command illustrates the use of the ``--grants`` option to grant read access to all users identified
|
|
153
153
|
by URI and full control to a specific user identified by their Canonical ID::
|
|
154
154
|
|
|
155
|
-
aws s3 cp file.txt s3://
|
|
155
|
+
aws s3 cp file.txt s3://amzn-s3-demo-bucket/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers full=id=79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be
|
|
156
156
|
|
|
157
157
|
Output::
|
|
158
158
|
|
|
159
|
-
upload: file.txt to s3://
|
|
159
|
+
upload: file.txt to s3://amzn-s3-demo-bucket/file.txt
|
|
160
160
|
|
|
161
161
|
**Example 11: Uploading a local file stream to S3**
|
|
162
162
|
|
|
@@ -164,13 +164,13 @@ Output::
|
|
|
164
164
|
|
|
165
165
|
The following ``cp`` command uploads a local file stream from standard input to a specified bucket and key::
|
|
166
166
|
|
|
167
|
-
aws s3 cp - s3://
|
|
167
|
+
aws s3 cp - s3://amzn-s3-demo-bucket/stream.txt
|
|
168
168
|
|
|
169
169
|
**Example 12: Uploading a local file stream that is larger than 50GB to S3**
|
|
170
170
|
|
|
171
171
|
The following ``cp`` command uploads a 51GB local file stream from standard input to a specified bucket and key. The ``--expected-size`` option must be provided, or the upload may fail when it reaches the default part limit of 10,000::
|
|
172
172
|
|
|
173
|
-
aws s3 cp - s3://
|
|
173
|
+
aws s3 cp - s3://amzn-s3-demo-bucket/stream.txt --expected-size 54760833024
|
|
174
174
|
|
|
175
175
|
**Example 13: Downloading an S3 object as a local file stream**
|
|
176
176
|
|
|
@@ -178,7 +178,7 @@ The following ``cp`` command uploads a 51GB local file stream from standard inpu
|
|
|
178
178
|
|
|
179
179
|
The following ``cp`` command downloads an S3 object locally as a stream to standard output. Downloading as a stream is not currently compatible with the ``--recursive`` parameter::
|
|
180
180
|
|
|
181
|
-
aws s3 cp s3://
|
|
181
|
+
aws s3 cp s3://amzn-s3-demo-bucket/stream.txt -
|
|
182
182
|
|
|
183
183
|
**Example 14: Uploading to an S3 access point**
|
|
184
184
|
|
awscli/examples/s3/ls.rst
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
**Example 1: Listing all user owned buckets**
|
|
2
2
|
|
|
3
|
-
The following ``ls`` command lists all of the bucket owned by the user. In this example, the user owns the buckets ``
|
|
3
|
+
The following ``ls`` command lists all of the bucket owned by the user. In this example, the user owns the buckets ``amzn-s3-demo-bucket`` and ``amzn-s3-demo-bucket2``. The timestamp is the date the bucket was created, shown in your machine's time zone. This date can change when making changes to your bucket, such as editing its bucket policy. Note if ``s3://`` is used for the path argument ``<S3Uri>``, it will list all of the buckets as well. ::
|
|
4
4
|
|
|
5
5
|
aws s3 ls
|
|
6
6
|
|
|
7
7
|
Output::
|
|
8
8
|
|
|
9
|
-
2013-07-11 17:08:50
|
|
9
|
+
2013-07-11 17:08:50 amzn-s3-demo-bucket
|
|
10
10
|
2013-07-24 14:55:44 amzn-s3-demo-bucket2
|
|
11
11
|
|
|
12
12
|
**Example 2: Listing all prefixes and objects in a bucket**
|
|
13
13
|
|
|
14
|
-
The following ``ls`` command lists objects and common prefixes under a specified bucket and prefix. In this example, the user owns the bucket ``
|
|
14
|
+
The following ``ls`` command lists objects and common prefixes under a specified bucket and prefix. In this example, the user owns the bucket ``amzn-s3-demo-bucket`` with the objects ``test.txt`` and ``somePrefix/test.txt``. The ``LastWriteTime`` and ``Length`` are arbitrary. Note that since the ``ls`` command has no interaction with the local filesystem, the ``s3://`` URI scheme is not required to resolve ambiguity and may be omitted. ::
|
|
15
15
|
|
|
16
|
-
aws s3 ls s3://
|
|
16
|
+
aws s3 ls s3://amzn-s3-demo-bucket
|
|
17
17
|
|
|
18
18
|
Output::
|
|
19
19
|
|
|
@@ -24,7 +24,7 @@ Output::
|
|
|
24
24
|
|
|
25
25
|
The following ``ls`` command lists objects and common prefixes under a specified bucket and prefix. However, there are no objects nor common prefixes under the specified bucket and prefix. ::
|
|
26
26
|
|
|
27
|
-
aws s3 ls s3://
|
|
27
|
+
aws s3 ls s3://amzn-s3-demo-bucket/noExistPrefix
|
|
28
28
|
|
|
29
29
|
Output::
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ Output::
|
|
|
34
34
|
|
|
35
35
|
The following ``ls`` command will recursively list objects in a bucket. Rather than showing ``PRE dirname/`` in the output, all the content in a bucket will be listed in order. ::
|
|
36
36
|
|
|
37
|
-
aws s3 ls s3://
|
|
37
|
+
aws s3 ls s3://amzn-s3-demo-bucket \
|
|
38
38
|
--recursive
|
|
39
39
|
|
|
40
40
|
Output::
|
|
@@ -54,7 +54,7 @@ Output::
|
|
|
54
54
|
|
|
55
55
|
The following ``ls`` command demonstrates the same command using the --human-readable and --summarize options. --human-readable displays file size in Bytes/MiB/KiB/GiB/TiB/PiB/EiB. --summarize displays the total number of objects and total size at the end of the result listing::
|
|
56
56
|
|
|
57
|
-
aws s3 ls s3://
|
|
57
|
+
aws s3 ls s3://amzn-s3-demo-bucket \
|
|
58
58
|
--recursive \
|
|
59
59
|
--human-readable \
|
|
60
60
|
--summarize
|
awscli/examples/s3/mb.rst
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
**Example 1: Create a bucket**
|
|
2
2
|
|
|
3
|
-
The following ``mb`` command creates a bucket. In this example, the user makes the bucket ``
|
|
3
|
+
The following ``mb`` command creates a bucket. In this example, the user makes the bucket ``amzn-s3-demo-bucket``. The bucket is
|
|
4
4
|
created in the region specified in the user's configuration file::
|
|
5
5
|
|
|
6
|
-
aws s3 mb s3://
|
|
6
|
+
aws s3 mb s3://amzn-s3-demo-bucket
|
|
7
7
|
|
|
8
8
|
Output::
|
|
9
9
|
|
|
10
|
-
make_bucket: s3://
|
|
10
|
+
make_bucket: s3://amzn-s3-demo-bucket
|
|
11
11
|
|
|
12
12
|
**Example 2: Create a bucket in the specified region**
|
|
13
13
|
|
|
14
14
|
The following ``mb`` command creates a bucket in a region specified by the ``--region`` parameter. In this example, the
|
|
15
|
-
user makes the bucket ``
|
|
15
|
+
user makes the bucket ``amzn-s3-demo-bucket`` in the region ``us-west-1``::
|
|
16
16
|
|
|
17
|
-
aws s3 mb s3://
|
|
17
|
+
aws s3 mb s3://amzn-s3-demo-bucket \
|
|
18
18
|
--region us-west-1
|
|
19
19
|
|
|
20
20
|
Output::
|
|
21
21
|
|
|
22
|
-
make_bucket: s3://
|
|
22
|
+
make_bucket: s3://amzn-s3-demo-bucket
|
awscli/examples/s3/mv.rst
CHANGED
|
@@ -2,55 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
The following ``mv`` command moves a single file to a specified bucket and key. ::
|
|
4
4
|
|
|
5
|
-
aws s3 mv test.txt s3://
|
|
5
|
+
aws s3 mv test.txt s3://amzn-s3-demo-bucket/test2.txt
|
|
6
6
|
|
|
7
7
|
Output::
|
|
8
8
|
|
|
9
|
-
move: test.txt to s3://
|
|
9
|
+
move: test.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
10
10
|
|
|
11
11
|
**Example 2: Move an object to the specified bucket and key**
|
|
12
12
|
|
|
13
13
|
The following ``mv`` command moves a single s3 object to a specified bucket and key. ::
|
|
14
14
|
|
|
15
|
-
aws s3 mv s3://
|
|
15
|
+
aws s3 mv s3://amzn-s3-demo-bucket/test.txt s3://amzn-s3-demo-bucket/test2.txt
|
|
16
16
|
|
|
17
17
|
Output::
|
|
18
18
|
|
|
19
|
-
move: s3://
|
|
19
|
+
move: s3://amzn-s3-demo-bucket/test.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
20
20
|
|
|
21
21
|
**Example 3: Move an S3 object to the local directory**
|
|
22
22
|
|
|
23
23
|
The following ``mv`` command moves a single object to a specified file locally. ::
|
|
24
24
|
|
|
25
|
-
aws s3 mv s3://
|
|
25
|
+
aws s3 mv s3://amzn-s3-demo-bucket/test.txt test2.txt
|
|
26
26
|
|
|
27
27
|
Output::
|
|
28
28
|
|
|
29
|
-
move: s3://
|
|
29
|
+
move: s3://amzn-s3-demo-bucket/test.txt to test2.txt
|
|
30
30
|
|
|
31
31
|
**Example 4: Move an object with it's original name to the specified bucket**
|
|
32
32
|
|
|
33
33
|
The following ``mv`` command moves a single object to a specified bucket while retaining its original name::
|
|
34
34
|
|
|
35
|
-
aws s3 mv s3://
|
|
35
|
+
aws s3 mv s3://amzn-s3-demo-bucket/test.txt s3://amzn-s3-demo-bucket2/
|
|
36
36
|
|
|
37
37
|
Output::
|
|
38
38
|
|
|
39
|
-
move: s3://
|
|
39
|
+
move: s3://amzn-s3-demo-bucket/test.txt to s3://amzn-s3-demo-bucket2/test.txt
|
|
40
40
|
|
|
41
41
|
**Example 5: Move all objects and prefixes in a bucket to the local directory**
|
|
42
42
|
|
|
43
43
|
When passed with the parameter ``--recursive``, the following ``mv`` command recursively moves all objects under a
|
|
44
|
-
specified prefix and bucket to a specified directory. In this example, the bucket ``
|
|
44
|
+
specified prefix and bucket to a specified directory. In this example, the bucket ``amzn-s3-demo-bucket`` has the objects
|
|
45
45
|
``test1.txt`` and ``test2.txt``. ::
|
|
46
46
|
|
|
47
|
-
aws s3 mv s3://
|
|
47
|
+
aws s3 mv s3://amzn-s3-demo-bucket . \
|
|
48
48
|
--recursive
|
|
49
49
|
|
|
50
50
|
Output::
|
|
51
51
|
|
|
52
|
-
move: s3://
|
|
53
|
-
move: s3://
|
|
52
|
+
move: s3://amzn-s3-demo-bucket/test1.txt to test1.txt
|
|
53
|
+
move: s3://amzn-s3-demo-bucket/test2.txt to test2.txt
|
|
54
54
|
|
|
55
55
|
**Example 6: Move all objects and prefixes in a bucket to the local directory, except ``.jpg`` files**
|
|
56
56
|
|
|
@@ -58,7 +58,7 @@ When passed with the parameter ``--recursive``, the following ``mv`` command rec
|
|
|
58
58
|
specified directory to a specified bucket and prefix while excluding some files by using an ``--exclude`` parameter. In
|
|
59
59
|
this example, the directory ``myDir`` has the files ``test1.txt`` and ``test2.jpg``. ::
|
|
60
60
|
|
|
61
|
-
aws s3 mv myDir s3://
|
|
61
|
+
aws s3 mv myDir s3://amzn-s3-demo-bucket/ \
|
|
62
62
|
--recursive \
|
|
63
63
|
--exclude "*.jpg"
|
|
64
64
|
|
|
@@ -70,39 +70,39 @@ Output::
|
|
|
70
70
|
|
|
71
71
|
When passed with the parameter ``--recursive``, the following ``mv`` command recursively moves all objects under a
|
|
72
72
|
specified bucket to another bucket while excluding some objects by using an ``--exclude`` parameter. In this example,
|
|
73
|
-
the bucket ``
|
|
73
|
+
the bucket ``amzn-s3-demo-bucket`` has the objects ``test1.txt`` and ``another/test1.txt``. ::
|
|
74
74
|
|
|
75
|
-
aws s3 mv s3://
|
|
75
|
+
aws s3 mv s3://amzn-s3-demo-bucket/ s3://amzn-s3-demo-bucket2/ \
|
|
76
76
|
--recursive \
|
|
77
|
-
--exclude "
|
|
77
|
+
--exclude "amzn-s3-demo-bucket/another/*"
|
|
78
78
|
|
|
79
79
|
Output::
|
|
80
80
|
|
|
81
|
-
move: s3://
|
|
81
|
+
move: s3://amzn-s3-demo-bucket/test1.txt to s3://amzn-s3-demo-bucket2/test1.txt
|
|
82
82
|
|
|
83
83
|
**Example 8: Move an object to the specified bucket and set the ACL**
|
|
84
84
|
|
|
85
85
|
The following ``mv`` command moves a single object to a specified bucket and key while setting the ACL to
|
|
86
86
|
``public-read-write``. ::
|
|
87
87
|
|
|
88
|
-
aws s3 mv s3://
|
|
88
|
+
aws s3 mv s3://amzn-s3-demo-bucket/test.txt s3://amzn-s3-demo-bucket/test2.txt \
|
|
89
89
|
--acl public-read-write
|
|
90
90
|
|
|
91
91
|
Output::
|
|
92
92
|
|
|
93
|
-
move: s3://
|
|
93
|
+
move: s3://amzn-s3-demo-bucket/test.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
94
94
|
|
|
95
95
|
**Example 9: Move a local file to the specified bucket and grant permissions**
|
|
96
96
|
|
|
97
97
|
The following ``mv`` command illustrates the use of the ``--grants`` option to grant read access to all users and full
|
|
98
98
|
control to a specific user identified by their email address. ::
|
|
99
99
|
|
|
100
|
-
aws s3 mv file.txt s3://
|
|
100
|
+
aws s3 mv file.txt s3://amzn-s3-demo-bucket/ \
|
|
101
101
|
--grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers full=emailaddress=user@example.com
|
|
102
102
|
|
|
103
103
|
Output::
|
|
104
104
|
|
|
105
|
-
move: file.txt to s3://
|
|
105
|
+
move: file.txt to s3://amzn-s3-demo-bucket/file.txt
|
|
106
106
|
|
|
107
107
|
**Example 10: Move a file to an S3 access point**
|
|
108
108
|
|
awscli/examples/s3/rb.rst
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
**Example 1: Delete a bucket**
|
|
2
2
|
|
|
3
|
-
The following ``rb`` command removes a bucket. In this example, the user's bucket is ``
|
|
3
|
+
The following ``rb`` command removes a bucket. In this example, the user's bucket is ``amzn-s3-demo-bucket``. Note that the bucket must be empty in order to remove::
|
|
4
4
|
|
|
5
|
-
aws s3 rb s3://
|
|
5
|
+
aws s3 rb s3://amzn-s3-demo-bucket
|
|
6
6
|
|
|
7
7
|
Output::
|
|
8
8
|
|
|
9
|
-
remove_bucket:
|
|
9
|
+
remove_bucket: amzn-s3-demo-bucket
|
|
10
10
|
|
|
11
11
|
**Example 2: Force delete a bucket**
|
|
12
12
|
|
|
13
13
|
The following ``rb`` command uses the ``--force`` parameter to first remove all of the objects in the bucket and then
|
|
14
|
-
remove the bucket itself. In this example, the user's bucket is ``
|
|
14
|
+
remove the bucket itself. In this example, the user's bucket is ``amzn-s3-demo-bucket`` and the objects in ``amzn-s3-demo-bucket`` are
|
|
15
15
|
``test1.txt`` and ``test2.txt``::
|
|
16
16
|
|
|
17
|
-
aws s3 rb s3://
|
|
17
|
+
aws s3 rb s3://amzn-s3-demo-bucket \
|
|
18
18
|
--force
|
|
19
19
|
|
|
20
20
|
Output::
|
|
21
21
|
|
|
22
|
-
delete: s3://
|
|
23
|
-
delete: s3://
|
|
24
|
-
remove_bucket:
|
|
22
|
+
delete: s3://amzn-s3-demo-bucket/test1.txt
|
|
23
|
+
delete: s3://amzn-s3-demo-bucket/test2.txt
|
|
24
|
+
remove_bucket: amzn-s3-demo-bucket
|
awscli/examples/s3/rm.rst
CHANGED
|
@@ -2,54 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
The following ``rm`` command deletes a single s3 object::
|
|
4
4
|
|
|
5
|
-
aws s3 rm s3://
|
|
5
|
+
aws s3 rm s3://amzn-s3-demo-bucket/test2.txt
|
|
6
6
|
|
|
7
7
|
Output::
|
|
8
8
|
|
|
9
|
-
delete: s3://
|
|
9
|
+
delete: s3://amzn-s3-demo-bucket/test2.txt
|
|
10
10
|
|
|
11
11
|
**Example 2: Delete all contents in a bucket**
|
|
12
12
|
|
|
13
13
|
The following ``rm`` command recursively deletes all objects under a specified bucket and prefix when passed with the
|
|
14
|
-
parameter ``--recursive``. In this example, the bucket ``
|
|
14
|
+
parameter ``--recursive``. In this example, the bucket ``amzn-s3-demo-bucket`` contains the objects ``test1.txt`` and
|
|
15
15
|
``test2.txt``::
|
|
16
16
|
|
|
17
|
-
aws s3 rm s3://
|
|
17
|
+
aws s3 rm s3://amzn-s3-demo-bucket \
|
|
18
18
|
--recursive
|
|
19
19
|
|
|
20
20
|
Output::
|
|
21
21
|
|
|
22
|
-
delete: s3://
|
|
23
|
-
delete: s3://
|
|
22
|
+
delete: s3://amzn-s3-demo-bucket/test1.txt
|
|
23
|
+
delete: s3://amzn-s3-demo-bucket/test2.txt
|
|
24
24
|
|
|
25
25
|
**Example 3: Delete all contents in a bucket, except ``.jpg`` files**
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
The following ``rm`` command recursively deletes all objects under a specified bucket and prefix when passed with the
|
|
29
29
|
parameter ``--recursive`` while excluding some objects by using an ``--exclude`` parameter. In this example, the bucket
|
|
30
|
-
``
|
|
30
|
+
``amzn-s3-demo-bucket`` has the objects ``test1.txt`` and ``test2.jpg``::
|
|
31
31
|
|
|
32
|
-
aws s3 rm s3://
|
|
32
|
+
aws s3 rm s3://amzn-s3-demo-bucket/ \
|
|
33
33
|
--recursive \
|
|
34
34
|
--exclude "*.jpg"
|
|
35
35
|
|
|
36
36
|
Output::
|
|
37
37
|
|
|
38
|
-
delete: s3://
|
|
38
|
+
delete: s3://amzn-s3-demo-bucket/test1.txt
|
|
39
39
|
|
|
40
40
|
**Example 4: Delete all contents in a bucket, except objects under the specified prefix**
|
|
41
41
|
|
|
42
42
|
The following ``rm`` command recursively deletes all objects under a specified bucket and prefix when passed with the
|
|
43
43
|
parameter ``--recursive`` while excluding all objects under a particular prefix by using an ``--exclude`` parameter. In
|
|
44
|
-
this example, the bucket ``
|
|
44
|
+
this example, the bucket ``amzn-s3-demo-bucket`` has the objects ``test1.txt`` and ``another/test.txt``::
|
|
45
45
|
|
|
46
|
-
aws s3 rm s3://
|
|
46
|
+
aws s3 rm s3://amzn-s3-demo-bucket/ \
|
|
47
47
|
--recursive \
|
|
48
48
|
--exclude "another/*"
|
|
49
49
|
|
|
50
50
|
Output::
|
|
51
51
|
|
|
52
|
-
delete: s3://
|
|
52
|
+
delete: s3://amzn-s3-demo-bucket/test1.txt
|
|
53
53
|
|
|
54
54
|
**Example 5: Delete an object from an S3 access point**
|
|
55
55
|
|
awscli/examples/s3/sync.rst
CHANGED
|
@@ -4,15 +4,15 @@ The following ``sync`` command syncs objects from a local directory to the speci
|
|
|
4
4
|
uploading the local files to S3. A local file will require uploading if the size of the local file is different than
|
|
5
5
|
the size of the S3 object, the last modified time of the local file is newer than the last modified time of the S3
|
|
6
6
|
object, or the local file does not exist under the specified bucket and prefix. In this example, the user syncs the
|
|
7
|
-
bucket ``
|
|
8
|
-
``test2.txt``. The bucket ``
|
|
7
|
+
bucket ``amzn-s3-demo-bucket`` to the local current directory. The local current directory contains the files ``test.txt`` and
|
|
8
|
+
``test2.txt``. The bucket ``amzn-s3-demo-bucket`` contains no objects. ::
|
|
9
9
|
|
|
10
|
-
aws s3 sync . s3://
|
|
10
|
+
aws s3 sync . s3://amzn-s3-demo-bucket
|
|
11
11
|
|
|
12
12
|
Output::
|
|
13
13
|
|
|
14
|
-
upload: test.txt to s3://
|
|
15
|
-
upload: test2.txt to s3://
|
|
14
|
+
upload: test.txt to s3://amzn-s3-demo-bucket/test.txt
|
|
15
|
+
upload: test2.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
16
16
|
|
|
17
17
|
**Example 2: Sync all S3 objects from the specified S3 bucket to another bucket**
|
|
18
18
|
|
|
@@ -21,15 +21,15 @@ prefix and bucket by copying S3 objects. An S3 object will require copying if th
|
|
|
21
21
|
the last modified time of the source is newer than the last modified time of the destination, or the S3 object does not
|
|
22
22
|
exist under the specified bucket and prefix destination.
|
|
23
23
|
|
|
24
|
-
In this example, the user syncs the bucket ``
|
|
24
|
+
In this example, the user syncs the bucket ``amzn-s3-demo-bucket`` to the bucket ``amzn-s3-demo-bucket2``. The bucket ``amzn-s3-demo-bucket`` contains the objects ``test.txt`` and ``test2.txt``. The bucket
|
|
25
25
|
``amzn-s3-demo-bucket2`` contains no objects::
|
|
26
26
|
|
|
27
|
-
aws s3 sync s3://
|
|
27
|
+
aws s3 sync s3://amzn-s3-demo-bucket s3://amzn-s3-demo-bucket2
|
|
28
28
|
|
|
29
29
|
Output::
|
|
30
30
|
|
|
31
|
-
copy: s3://
|
|
32
|
-
copy: s3://
|
|
31
|
+
copy: s3://amzn-s3-demo-bucket/test.txt to s3://amzn-s3-demo-bucket2/test.txt
|
|
32
|
+
copy: s3://amzn-s3-demo-bucket/test2.txt to s3://amzn-s3-demo-bucket2/test2.txt
|
|
33
33
|
|
|
34
34
|
**Example 3: Sync all S3 objects from the specified S3 bucket to the local directory**
|
|
35
35
|
|
|
@@ -38,62 +38,62 @@ downloading S3 objects. An S3 object will require downloading if the size of the
|
|
|
38
38
|
local file, the last modified time of the S3 object is newer than the last modified time of the local file, or the S3
|
|
39
39
|
object does not exist in the local directory. Take note that when objects are downloaded from S3, the last modified
|
|
40
40
|
time of the local file is changed to the last modified time of the S3 object. In this example, the user syncs the
|
|
41
|
-
bucket ``
|
|
41
|
+
bucket ``amzn-s3-demo-bucket`` to the current local directory. The bucket ``amzn-s3-demo-bucket`` contains the objects ``test.txt`` and
|
|
42
42
|
``test2.txt``. The current local directory has no files::
|
|
43
43
|
|
|
44
|
-
aws s3 sync s3://
|
|
44
|
+
aws s3 sync s3://amzn-s3-demo-bucket .
|
|
45
45
|
|
|
46
46
|
Output::
|
|
47
47
|
|
|
48
|
-
download: s3://
|
|
49
|
-
download: s3://
|
|
48
|
+
download: s3://amzn-s3-demo-bucket/test.txt to test.txt
|
|
49
|
+
download: s3://amzn-s3-demo-bucket/test2.txt to test2.txt
|
|
50
50
|
|
|
51
51
|
**Example 4: Sync all local objects to the specified bucket and delete all files that do not match**
|
|
52
52
|
|
|
53
53
|
The following ``sync`` command syncs objects under a specified prefix and bucket to files in a local directory by
|
|
54
54
|
uploading the local files to S3. Because of the ``--delete`` parameter, any files existing under the
|
|
55
55
|
specified prefix and bucket but not existing in the local directory will be deleted. In this example, the user syncs
|
|
56
|
-
the bucket ``
|
|
57
|
-
``test2.txt``. The bucket ``
|
|
56
|
+
the bucket ``amzn-s3-demo-bucket`` to the local current directory. The local current directory contains the files ``test.txt`` and
|
|
57
|
+
``test2.txt``. The bucket ``amzn-s3-demo-bucket`` contains the object ``test3.txt``::
|
|
58
58
|
|
|
59
|
-
aws s3 sync . s3://
|
|
59
|
+
aws s3 sync . s3://amzn-s3-demo-bucket \
|
|
60
60
|
--delete
|
|
61
61
|
|
|
62
62
|
Output::
|
|
63
63
|
|
|
64
|
-
upload: test.txt to s3://
|
|
65
|
-
upload: test2.txt to s3://
|
|
66
|
-
delete: s3://
|
|
64
|
+
upload: test.txt to s3://amzn-s3-demo-bucket/test.txt
|
|
65
|
+
upload: test2.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
66
|
+
delete: s3://amzn-s3-demo-bucket/test3.txt
|
|
67
67
|
|
|
68
68
|
**Example 5: Sync all local objects to the specified bucket except ``.jpg`` files**
|
|
69
69
|
|
|
70
70
|
The following ``sync`` command syncs objects under a specified prefix and bucket to files in a local directory by
|
|
71
71
|
uploading the local files to S3. Because of the ``--exclude`` parameter, all files matching the pattern
|
|
72
|
-
existing both in S3 and locally will be excluded from the sync. In this example, the user syncs the bucket ``
|
|
72
|
+
existing both in S3 and locally will be excluded from the sync. In this example, the user syncs the bucket ``amzn-s3-demo-bucket``
|
|
73
73
|
to the local current directory. The local current directory contains the files ``test.jpg`` and ``test2.txt``. The
|
|
74
|
-
bucket ``
|
|
74
|
+
bucket ``amzn-s3-demo-bucket`` contains the object ``test.jpg`` of a different size than the local ``test.jpg``::
|
|
75
75
|
|
|
76
|
-
aws s3 sync . s3://
|
|
76
|
+
aws s3 sync . s3://amzn-s3-demo-bucket \
|
|
77
77
|
--exclude "*.jpg"
|
|
78
78
|
|
|
79
79
|
Output::
|
|
80
80
|
|
|
81
|
-
upload: test2.txt to s3://
|
|
81
|
+
upload: test2.txt to s3://amzn-s3-demo-bucket/test2.txt
|
|
82
82
|
|
|
83
83
|
**Example 6: Sync all local objects to the specified bucket except specified directory files**
|
|
84
84
|
|
|
85
85
|
The following ``sync`` command syncs files under a local directory to objects under a specified prefix and bucket by
|
|
86
86
|
downloading S3 objects. This example uses the ``--exclude`` parameter flag to exclude a specified directory
|
|
87
87
|
and S3 prefix from the ``sync`` command. In this example, the user syncs the local current directory to the bucket
|
|
88
|
-
``
|
|
89
|
-
``
|
|
88
|
+
``amzn-s3-demo-bucket``. The local current directory contains the files ``test.txt`` and ``another/test2.txt``. The bucket
|
|
89
|
+
``amzn-s3-demo-bucket`` contains the objects ``another/test5.txt`` and ``test1.txt``::
|
|
90
90
|
|
|
91
|
-
aws s3 sync s3://
|
|
91
|
+
aws s3 sync s3://amzn-s3-demo-bucket/ . \
|
|
92
92
|
--exclude "*another/*"
|
|
93
93
|
|
|
94
94
|
Output::
|
|
95
95
|
|
|
96
|
-
download: s3://
|
|
96
|
+
download: s3://amzn-s3-demo-bucket/test1.txt to test1.txt
|
|
97
97
|
|
|
98
98
|
**Example 7: Sync all objects between buckets in different regions**
|
|
99
99
|
|
|
@@ -16,9 +16,9 @@ make modifications to the file, and then use ``put-bucket-policy`` to
|
|
|
16
16
|
apply the modified bucket policy. To download the bucket policy to a file,
|
|
17
17
|
you can run::
|
|
18
18
|
|
|
19
|
-
aws s3api get-bucket-policy --bucket
|
|
19
|
+
aws s3api get-bucket-policy --bucket amzn-s3-demo-bucket --query Policy --output text > policy.json
|
|
20
20
|
|
|
21
21
|
You can then modify the ``policy.json`` file as needed. Finally you can apply
|
|
22
22
|
this modified policy back to the S3 bucket by running::
|
|
23
23
|
|
|
24
|
-
aws s3api put-bucket-policy --bucket
|
|
24
|
+
aws s3api put-bucket-policy --bucket amzn-s3-demo-bucket --policy file://policy.json
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: awscli
|
|
3
|
-
Version: 1.38.
|
|
3
|
+
Version: 1.38.8
|
|
4
4
|
Summary: Universal Command Line Environment for AWS.
|
|
5
5
|
Home-page: http://aws.amazon.com/cli/
|
|
6
6
|
Author: Amazon Web Services
|
|
@@ -23,7 +23,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
23
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
24
|
Requires-Python: >= 3.8
|
|
25
25
|
License-File: LICENSE.txt
|
|
26
|
-
Requires-Dist: botocore (==1.37.
|
|
26
|
+
Requires-Dist: botocore (==1.37.8)
|
|
27
27
|
Requires-Dist: docutils (<0.17,>=0.10)
|
|
28
28
|
Requires-Dist: s3transfer (<0.12.0,>=0.11.0)
|
|
29
29
|
Requires-Dist: PyYAML (<6.1,>=3.10)
|