Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc/#1166 updated new AWS S3 Object capabilities #1179

Merged
merged 8 commits into from
Oct 30, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,13 @@
aws_secret_access_key="YOUR AWS SECRET ACCESS KEY",
aws_s3_bucket_name="YOUR AWS BUCKET NAME",
aws_s3_object_key="taipy_object",
aws_s3_object_parameters = {'CacheControl': 'max-age=86400'}
aws_s3_client_parameters={
"endpoint_url": "https://s3.custom-endpoint.com"
},
aws_s3_get_object_parameters={
"Range": "bytes=0-1048576"
},
aws_s3_put_object_parameters={
"CacheControl": "max-age=86400"
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -833,13 +833,15 @@ section, multiple parameters can be provided.
- _**aws_region**_ represents the geographic area where the AWS infrastructure is located.
- _**aws_s3_bucket_name**_ represents the name of the AWS S3 bucket.
- _**aws_s3_object_key**_ represents the name of the object (file) that needs to be read or written.
- _**aws_s3_object_parameters**_ represents additional arguments to be passed to interact with AWS.
- _**aws_s3_client_parameters**_ represents additional parameters for advanced use cases to be passed to the Amazon Web Services (AWS) S3 client. Each parameter key must match the name of a parameter of the [`boto3.session.Session.client` API](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html#boto3.session.Session.client).
- _**aws_s3_get_object_parameters**_ represents additional parameters to be passed to the Amazon Web Services (AWS) S3 client get function for advanced reading use cases. Each parameter key must match the name of a parameter of the [`boto3.client.get_object` API](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/get_object.html).
- _**aws_s3_put_object_parameters**_ represents additional parameters to be passed to the Amazon Web Services (AWS) S3 client put function for advanced writing use cases. Each parameter key must match the name of a parameter of the [`boto3.client.put_object` API](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/put_object.html).
jrobinAV marked this conversation as resolved.
Show resolved Hide resolved

In this example, we configure an *s3_object* data node with the id "my_s3_object":

- Its scope is the default value `SCENARIO`.
- The object_key name is "taipy_object".
- An additional argument is passed to the AWS S3 to set the max age of the cache.
- An additional argument is passed for configuring the AWS S3 client and setting cache control during object operations.
jrobinAV marked this conversation as resolved.
Show resolved Hide resolved

```python linenums="1"
{%
Expand Down