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
# 3. Create an additional client using the credentials with S3 Express permissions.
165
-
print("")
166
164
print(
167
-
"3. Create an additional client using the credentials with S3 Express permissions."
168
-
)
169
-
print(
170
-
"This client is created with the credentials associated with the user account with the S3 Express policy attached, so it can perform S3 Express operations."
165
+
"""
166
+
3. Create an additional client using the credentials with S3 Express permissions. This client is created with the
167
+
credentials associated with the user account with the S3 Express policy attached, so it can perform S3 Express operations.
"All the roles and policies were created an attached to the user. Then, a new S3 Client and Service were created using that user's credentials."
181
-
)
182
-
print(
183
-
"We can now use this client to make calls to S3 Express operations. Keeping permissions in mind (and adhering to least-privilege) is crucial to S3 Express."
178
+
"""
179
+
All the roles and policies were created and attached to the user. Then a new S3 Client were created using
180
+
that user's credentials. We can now use this client to make calls to S3 Express operations. Keeping permissions in mind
181
+
(and adhering to least-privilege) is crucial to S3 Express.
182
+
"""
184
183
)
185
184
press_enter_to_continue()
186
185
# 4. Create two buckets.
187
-
print("")
188
-
print("3. Create two buckets.")
189
186
print(
190
-
"Now we will create a Directory bucket, which is the linchpin of the S3 Express One Zone service."
191
-
)
192
-
print(
193
-
"Directory buckets behave in different ways from regular S3 buckets, which we will explore here."
194
-
)
195
-
print(
196
-
"We'll also create a normal bucket, put an object into the normal bucket, and copy it over to the Directory bucket."
187
+
"""
188
+
3. Create two buckets.
189
+
Now we will create a Directory bucket which is the linchpin of the S3 Express One Zone service. Directory buckets
190
+
behave in different ways from regular S3 buckets which we will explore here. We'll also create a normal bucket, put
191
+
an object into the normal bucket, and copy it over to the Directory bucket.
192
+
"""
197
193
)
198
194
# Create a directory bucket. These are different from normal S3 buckets in subtle ways.
"It worked! It's important to remember the user permissions when interacting with Directory buckets."
266
-
)
267
-
print(
268
-
"Instead of validating permissions on every call as normal buckets do, Directory buckets utilize the user credentials and session token to validate."
269
-
)
270
-
print(
271
-
"This allows for much faster connection speeds on every call. For single calls, this is low, but for many concurrent calls, this adds up to a lot of time saved."
256
+
"""
257
+
It worked! It's important to remember the user permissions when interacting with Directory buckets. Instead of validating
258
+
permissions on every call as normal buckets do, Directory buckets utilize the user credentials and session token to validate.
259
+
This allows for much faster connection speeds on every call. For single calls, this is low, but for many concurrent calls
"Now, let's do a performance test. We'll download the same object from each bucket $downloads times and compare the total time needed. Note: the performance difference will be much more pronounced if this example is run in an EC2 instance in the same AZ as the bucket."
274
+
"""
275
+
Now, let's do a performance test. We'll download the same object from each bucket 'downloads' times
276
+
and compare the total time needed. Note: the performance difference will be much more pronounced if this
277
+
example is run in an EC2 instance in the same Availability Zone as the bucket.
0 commit comments