Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/aws-service-sanity-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Main Branch Checks
permissions:
contents: read

on:
push:
branches-ignore:
- 'main'
- 'docs'

jobs:
verify-documentation-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify documentation files and links
# check if the files exists in the repository. The file list is in utils/doc-links.txt.
run: |
missing=0
while read -r file || [ -n "$file" ]; do
if [ ! -f "$file" ]; then
if [ $missing -eq 0 ]; then
echo "❌ Missing files referenced in AWS documentation:"
missing=$((missing + 1))
fi
echo " - $file"
fi
done < utils/doc-links.txt

if [ $missing -ge 1 ]; then
echo "Instructions:"
echo " The above files are required for AWS services or documentations."
echo " Restore missing files or update documentation before merge."
echo " Refer to team wiki "AWS Service and Documentation Links" for details. "
exit 1
else
echo "✅ All documentation-referenced files exist"
fi
6 changes: 3 additions & 3 deletions documents/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

### Where should I start?

If you are just getting started make sure you [install this sdk](https://github.com/aws/aws-iot-device-sdk-java-v2#installation) and then build and run the [basic PubSub](https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples#pubsub)
If you are just getting started make sure you [install this sdk](https://github.com/aws/aws-iot-device-sdk-java-v2#installation) and then build and run the [Mqtt5 X509 Sample](https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples/Mqtt/Mqtt5X509)

### How do I enable logging?

Expand All @@ -32,10 +32,10 @@ To enable logging in the samples, you will need to set the following system prop
* `aws.crt.log.level`: The level of logging shown. Can be `Trace`, `Debug`, `Info`, `Warn`, `Error`, `Fatal`, or `None`. Defaults to `Warn`.
* `aws.crt.log.filename`: The path to save the log file. Only needed if `aws.crt.log.destination` is set to `File`.

For example, to run `BasicPubSub` with logging you could use the following:
For example, to run `Mqtt X509` with logging you could use the following:

```sh
mvn compile exec:java -pl samples/Mqtt/Mqtt5X509 -Daws.crt.debugnative=true -Daws.crt.log.level=Debug -Daws.crt.log.destionation=Stdout -Dexec.mainClass=pubsub.PubSub -Dexec.args='--endpoint <endpoint> --cert <path to cert> --key <path to key>'
mvn compile exec:java -pl samples/Mqtt/Mqtt5X509 -Daws.crt.debugnative=true -Daws.crt.log.level=Debug -Daws.crt.log.destionation=Stdout -Dexec.mainClass=mqtt5x509.Mqtt5X509 -Dexec.args='--endpoint <endpoint> --cert <path to cert> --key <path to key>'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new samples have been adjusted to no longer need -Dexec.mainClass=mqtt5x509.Mqtt5X509. This example command should be simplified to:
mvn compile exec:java
-pl samples/Mqtt/Mqtt5X509
-Dexec.args="
--endpoint
--cert
--key "

```

You can also enable [CloudWatch logging](https://docs.aws.amazon.com/iot/latest/developerguide/cloud-watch-logs.html) for IoT which will provide you with additional information that is not available on the client side sdk.
Expand Down
4 changes: 2 additions & 2 deletions documents/MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,8 @@ samples.
### Example

It's always helpful to look at a working example to see how new functionality works, to be able to tweak different options,
to compare with existing code. For that reason, we implemented a [Publish/Subscribe example](https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples/Mqtt5/PubSub)
([source code](https://github.com/aws/aws-iot-device-sdk-java-v2/blob/main/samples/Mqtt5/PubSub/src/main/java/pubsub/PubSub.java))
to compare with existing code. For that reason, we implemented a [Publish/Subscribe example](https://github.com/aws/aws-iot-device-sdk-java-v2/tree/main/samples/Mqtt/Mqtt5X509)
([source code](https://github.com/aws/aws-iot-device-sdk-java-v2/blob/main/samples/Mqtt/Mqtt5X509/src/main/java/mqtt5x509/Mqtt5X509.java))
in the V2 SDK similar to a sample provided by V1 SDK (see a corresponding [readme section](https://github.com/aws/aws-iot-device-sdk-java/tree/master?tab=readme-ov-file#sample-applications)
and [source code](https://github.com/aws/aws-iot-device-sdk-java/blob/master/aws-iot-device-sdk-java-samples/src/main/java/com/amazonaws/services/iot/client/sample/pubSub/PublishSubscribeSample.java)).

Expand Down
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

<modules>
<module>sdk</module>
<module>samples/BasicPubSub</module>
<module>samples/Mqtt/Mqtt5X509</module>
<module>samples/Mqtt/Mqtt5AwsWebsocket</module>
<module>samples/Mqtt/Mqtt5CustomAuthSigned</module>
Expand Down
Loading
Loading