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
Demo http S3 generate presigned url - generate not only GET but also PUT (for http S3 upload demo) (#1933)
presigned URL demo - generate not only GET but also PUT (for S3 upload demo)
updated documentation
Update demos/http/http_demo_s3_generate_presigned_url/http_demo_s3_generate_presigned_url.c
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -470,7 +470,7 @@ In order to set these configurations manually, edit `demo_config.h` in `demos/ht
470
470
* Set `S3_PRESIGNED_GET_URL` to a S3 presigned URL with GET access.
471
471
* Set `S3_PRESIGNED_PUT_URL` to a S3 presigned URL with PUT access.
472
472
473
-
You can generate the presigned urls using [demos/http/common/src/presigned_urls_gen.py](demos/http/common/src/presigned_urls_gen.py). More info can be found [here](demos/http/common/src/README.md).
473
+
You can generate the presigned urls using [demos/http/common/src/presigned_urls_gen.py](demos/http/common/src/presigned_urls_gen.py) (more info can be found [here](demos/http/common/src/README.md)) or [demos/http/http_demo_s3_generate_presigned_url/README.md](demos/http/http_demo_s3_generate_presigned_url/README.md).
474
474
475
475
#### Configure S3 Download HTTP Demo using SigV4 Library:
476
476
@@ -503,13 +503,13 @@ The following creates a job that specifies a Linux Kernel link for downloading.
The above may not function correctly on ARM machines like mac. As an alternative, you can clone the repository and build the application from its source code.
673
+
The above may not function correctly on ARM machines like mac. As an alternative, you can clone the repository and build the application from its source code.
674
674
For Windows without WSL, [download tmole.exe](https://tunnelmole.com/downloads/tmole.exe) and add it to your [PATH](https://www.wikihow.com/Change-the-PATH-Environment-Variable-on-Windows).
Copy file name to clipboardExpand all lines: demos/http/http_demo_s3_download/README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ Following steps needs to be followed to configure HTTP S3 Download Demo to use S
4
4
5
5
### Prerequisites
6
6
7
-
1. You will need an AWS Account with S3 access before beginning. You must be familiar with AWS IoT and IAM to perform steps using the AWS CLI. You must install and configure the AWS CLI in order to follow the steps.
8
-
For information on AWS S3 please see: https://docs.aws.amazon.com/AmazonS3/latest/dev/Welcome.html
9
-
For AWS CLI installation information please see: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
7
+
1. You will need an AWS Account with S3 access before beginning. You must be familiar with AWS IoT and IAM to perform steps using the AWS CLI. You must install and configure the AWS CLI in order to follow the steps.
8
+
For information on AWS S3 please see: https://docs.aws.amazon.com/AmazonS3/latest/dev/Welcome.html
9
+
For AWS CLI installation information please see: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html
10
10
For AWS CLI configuration information please see: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html
11
11
12
12
```sh
@@ -15,7 +15,7 @@ Following steps needs to be followed to configure HTTP S3 Download Demo to use S
15
15
16
16
### Detailed Steps
17
17
18
-
#### 1. Create an AWS IoT thing:
18
+
#### 1. Create an AWS IoT thing:
19
19
20
20
You may utilize an already existing AWS IoT Thing or create a new one in the IoT Core section of the AWS Management Console UI.
21
21
@@ -37,8 +37,8 @@ Run the following command in the AWS CLI to attach the device certificate to you
Next, configure an IAM role in your AWS account that will be assumed by the credentials provider on behalf of your device. You are required to associate two policies with the role: a trust policy that controls who can assume the role, and an access policy that controls which actions can be performed on which resources by assuming the role.
44
44
@@ -108,8 +108,8 @@ Now, run the following command to attach the policy to the IAM user.
108
108
aws iam attach-user-policy --policy-arn arn:aws:iam::<your_aws_account_id>:policy/passrolepermission --user-name <user_name>
109
109
```
110
110
111
-
#### 4. Create a role alias:
112
-
111
+
#### 4. Create a role alias:
112
+
113
113
Now that you have configured the IAM role, you will create a role alias with AWS IoT. You must provide the following pieces of information when creating a role alias:
114
114
115
115
RoleAlias: This is the primary key of the role alias data model and hence a mandatory attribute. It is a string; the minimum length is 1 character, and the maximum length is 128 characters.
@@ -120,7 +120,7 @@ Run the following command in the AWS CLI to create a role alias. Use the credent
You created and registered a certificate with AWS IoT earlier for successful authentication of your device. Now, you need to create and attach a policy to the certificate to authorize the request for the security token.
125
125
```
126
126
{
@@ -143,8 +143,8 @@ Use the following command to attach the policy with the certificate you register
Make an HTTPS request to the credentials provider to fetch a security token. You have to supply the following information:
149
149
150
150
Certificate and key pair: Because this is an HTTP request over TLS mutual authentication, you have to provide the certificate and the corresponding key pair to your client while making the request. Use the same certificate and key pair that you used during certificate registration with AWS IoT.
@@ -174,13 +174,13 @@ The following is sample output of the describe-endpoint command. It contains the
174
174
175
175
#### 8. After the following the above steps, configure the below macros in `demo_config.h`.
176
176
```c
177
-
#define AWS_IOT_THING_NAME "Name of IOT Thing that you provided in STEP 1"
177
+
#define AWS_IOT_THING_NAME "Name of IOT Thing that you provided in STEP 1"
178
178
#define AWS_IOT_CREDENTIAL_PROVIDER_ROLE "Name of ROLE ALIAS that you provided in STEP 4"
179
179
#define AWS_S3_BUCKET_NAME "Name of Bucket that contains the object that needs to be downloaded"
180
180
#define AWS_S3_BUCKET_REGION "Region where Bucket is located"
181
181
#define AWS_S3_OBJECT_NAME "Name of object that needs to be downloaded from AWS S3"
0 commit comments