Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit

Permalink
Update to v3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hayesry committed Jun 21, 2023
1 parent 0475203 commit d338afd
Show file tree
Hide file tree
Showing 12 changed files with 1,391 additions and 1,336 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [3.0.2] - 2023-06-12
### Changed
- Added deployment details in README.md

### Fixed
- fast-xml-parser vulnerability

## [3.0.1] - 2023-04-27
### Changed
- Upgraded to Node 18
Expand Down
32 changes: 26 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For more information and a detailed deployment guide, visit the [IoT Device Simu
In addition to the AWS Solutions Constructs, the solution uses AWS CDK directly to create infrastructure resources.
# Customizing the Solution
## Prerequisites for Customization
- Node.js 14.x or later
- Node.js 18.x or later

### 1. Clone the repository
```bash
Expand All @@ -47,6 +47,7 @@ export DIST_BUCKET_PREFIX=my-bucket-name # bucket where customized code will res
export SOLUTION_NAME=my-solution-name # the solution name
export VERSION=my-version # version number for the customized code
```
_Note:_ When you define `DIST_BUCKET_PREFIX`, a randomized value is recommended. You will need to create an S3 bucket where the name is `<DIST_BUCKET_PREFIX>-<REGION>`. The solution's CloudFormation template will expect the source code to be located in a bucket matching that name

## Unit Test
After making changes, run unit tests to make sure added customization passes the tests:
Expand All @@ -64,14 +65,33 @@ chmod +x build-s3-dist.sh
```

## Deploy
* Deploy the distributable to the Amazon S3 bucket in your account. Make sure you are uploading the distributable to the `<DIST_BUCKET_PREFIX>-<REGION>` bucket.
* Get the link of the solution template uploaded to your Amazon S3 bucket.
* Deploy the solution to your account by launching a new AWS CloudFormation stack using the link of the solution template in Amazon S3.

### 3. Deploy the solution
- Deploy the distributable to the Amazon S3 bucket in your account. Make sure you are uploading all files and directories under `deployment/global-s3-assets` and `deployment/regional-s3-assets` to `<SOLUTION_NAME>/<VERSION>` folder in the `<DIST_BUCKET_PREFIX>-<REGION>` bucket (e.g. `s3://<DIST_BUCKET_PREFIX>-<REGION>/<SOLUTION_NAME>/<VERSION>/`).
CLI based S3 command to sync the buckets is:
```bash
aws s3 sync $MAIN_DIRECTORY/deployment/global-s3-assets/ s3://${DIST_BUCKET_PREFIX}-${REGION}/${SOLUTION_NAME}/${VERSION}/
aws s3 sync $MAIN_DIRECTORY/deployment/regional-s3-assets/ s3://${DIST_BUCKET_PREFIX}-${REGION}/${SOLUTION_NAME}/${VERSION}/
```
- Get the link of the `iot-device-simulator.template` uploaded to your Amazon S3 bucket.
- Deploy the IoT Device Simulator solution to your account by launching a new AWS CloudFormation stack using the S3 link of the `iot-device-simulator.template`.

CLI based CloudFormation deployment:

```bash
export [email protected] # The email used to sign in web interface.
export CF_STACK_NAME=iot # name of the cloudformation stack

aws cloudformation create-stack \
--profile ${AWS_PROFILE:-default} \
--region ${REGION} \
--template-url https://${DIST_BUCKET_PREFIX}-${REGION}.s3.amazonaws.com/${SOLUTION_NAME}/${VERSION}/iot-device-simulator.template \
--stack-name ${CF_STACK_NAME} \
--capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM CAPABILITY_AUTO_EXPAND \
--parameters \
ParameterKey=UserEmail,ParameterValue=${INITIAL_USER}

```


# Collection of operational metrics
This solution collects anonymous operational metrics to help AWS improve the quality and features of the solution. For more information, including how to disable this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/iot-device-simulator/operational-metrics.html).

Expand Down
110 changes: 17 additions & 93 deletions source/console/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions source/console/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iot-device-simulator-console",
"version": "3.0.1",
"version": "3.0.2",
"private": true,
"dependencies": {
"@aws-amplify/api": "^4.0.6",
Expand Down Expand Up @@ -38,7 +38,8 @@
"overrides": {
"[email protected]": {
"nth-check": "2.1.1"
}
},
"fast-xml-parser": "4.2.4"
},
"scripts": {
"start": "react-scripts start",
Expand Down
Loading

0 comments on commit d338afd

Please sign in to comment.