Git Product home page Git Product logo

aws-samples / connected-drink-dispenser-workshop Goto Github PK

View Code? Open in Web Editor NEW
40.0 8.0 20.0 118.59 MB

Code and walk-through to assemble, program and build a multi-user Amazon FreeRTOS and AWS IoT enabled drink dispenser.

License: MIT No Attribution

Python 14.65% C 81.58% JavaScript 0.15% HTML 0.08% Vue 0.26% CMake 0.72% Shell 0.01% Go 0.04% PowerShell 0.01% Assembly 2.47% Batchfile 0.04%

connected-drink-dispenser-workshop's Introduction

Connected Drink Dispenser Workshop

Code and walk-through to assemble, program and build your very own multi-user Amazon FreeRTOS and AWS IoT enabled drink dispenser.

This is the base repository that when cloned, will walk you through the steps to build, deploy, and run in your own AWS account.

The workshop participants will work with hardware and micro controllers, and then interact with their, and others, drink dispensers through a software-a-a-service (SaaS) set of Cloud components.


Getting Started Quickly

First clone the repository locally:

$ git clone https://github.com/aws-samples/connected-drink-dispenser-workshop.git

Next, navigate to the connected-drink-dispenser-workshop/docs/hugo/public directory and double-click index.html. This will bring up a local version of the documentation.

From the main Welcome to the Connected Drink Dispenser Workshop! page, click on the Setting Up the Workshop link in the left navigation column. From there you can navigate through the steps to complete prerequisites, deploy the stack, and then to deploy the documentation for participants to use.

Contributing

Please see the CONTRIBUTING.md file for details on how to contribute to this repository.

License Summary

This sample code is made available under the MIT-0 license. See the LICENSE file for a complete description.

connected-drink-dispenser-workshop's People

Contributors

ashmagin avatar dependabot[bot] avatar gadams999 avatar ghsecuritylab avatar jpeddicord avatar mangelino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

connected-drink-dispenser-workshop's Issues

JST-2 connector upside down?

Is it expected that the controller board starts generating heat once you've connected the battery?

The connector appears to be upside down, when compared to the instruction pictures. And one would expect the black cable to go to ground.

IMG_20191216_210433
IMG_20191216_210243

CDK deploy fails

I am trying to create the environment of the workshop in eu-central-1. Fixed some issues in cdk_app.py and static_site_construct.py (listed in an other issue). The application starts to create the stack however it fails with this error message:

28/99 | 3:32:46 PM | CREATE_FAILED | AWS::CloudFront::Distribution | StaticSite/SiteDistribution/CFDistribution (StaticSiteSiteDistributionCFDistribution500D676B) The specified SSL certificate doesn't exist, isn't in us-east-1 region, isn't valid, or doesn't include a valid certificate chain. (Service: AmazonCloudFront; Status Code: 400; Error Code: InvalidViewerCertificate; Request ID: 118a47d5-6e62-43ec-9ef8-74f18170b8a1)
new CloudFrontWebDistribution (/tmp/jsii-kernel-8eVR2P/node_modules/@aws-cdk/aws-cloudfront/lib/web_distribution.js:338:30)
_ obj._wrapSandboxCode (/home/ec2-user/environment/connected-drink-dispenser-workshop/deploy/.env/lib/python3.6/dist-packages/jsii/_embedded/jsii/jsii-runtime.js:7761:49)
_ Kernel._wrapSandboxCode (/home/ec2-user/environment/connected-drink-dispenser-workshop/deploy/.env/lib/python3.6/dist-packages/jsii/_embedded/jsii/jsii-runtime.js:8221:20)
_ Kernel._create (/home/ec2-user/environment/connected-drink-dispenser-workshop/deploy/.env/lib/python3.6/dist-packages/jsii/_embedded/jsii/jsii-runtime.js:7761:26)
_ Kernel.create (/home/ec2-user/environment/connected-drink-dispenser-workshop/deploy/.env/lib/python3.6/dist-packages/jsii/_embedded/jsii/jsii-runtime.js:7508:21)
_ KernelHost.processRequest (/home/ec2-user/environment/connected-drink-dispenser-workshop/deploy/.env/lib/python3.6/dist-packages/jsii/_embedded/jsii/jsii-runtime.js:7296:28)
_ KernelHost.run (/home/ec2-user/environment/connected-drink-dispenser-workshop/deploy/.env/lib/python3.6/dist-packages/jsii/_embedded/jsii/jsii-runtime.js:7236:14)
_ Immediate.setImmediate [as _onImmediate] (/home/ec2-user/environment/connected-drink-dispenser-workshop/deploy/.env/lib/python3.6/dist-packages/jsii/_embedded/jsii/jsii-runtime.js:7239:37)
_ runCallback (timers.js:705:18)
_ tryOnImmediate (timers.js:676:5)
_ processImmediate (timers.js:658:5)

I assume the problem is that it tries to use the ssl certificate in us-east-1 which is available in eu-central-1. I configured Region=eu-central-1 in config.json and fixed the constant in cdk_app.py. I cannot find any other occurence of "us-east-" in the sources but the application seems to get this information from somewhere.

"ImportError: cannot import name '_Union' from 'typing' "

Thanks for your presentation today. Probably more fun than I've had at a conference session. I guess that reveals how little I get out. :-)

Runing Python 3.8 on Mac and seeing this error after installing all the dependencies and trying to run cdk synth:

(awscli) 8c859026bc23:deploy causey$ cdk synth
Traceback (most recent call last):
  File "cdk_app.py", line 12, in <module>
    from aws_cdk import core
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/aws_cdk/core/__init__.py", line 406, in <module>
    import jsii
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/jsii/__init__.py", line 4, in <module>
    from ._runtime import (
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/jsii/_runtime.py", line 6, in <module>
    from jsii import _reference_map
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/jsii/_reference_map.py", line 6, in <module>
    from ._kernel.types import JSClass, Referenceable
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/jsii/_kernel/__init__.py", line 15, in <module>
    from jsii._kernel.providers import BaseProvider, ProcessProvider
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/jsii/_kernel/providers/__init__.py", line 2, in <module>
    from jsii._kernel.providers.process import ProcessProvider
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/jsii/_kernel/providers/process.py", line 15, in <module>
    import cattr  # type: ignore
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/cattr/__init__.py", line 2, in <module>
    from .converters import Converter, UnstructureStrategy
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/cattr/converters.py", line 3, in <module>
    from ._compat import (
  File "/Users/causey/.pyenv/versions/awscli/lib/python3.8/site-packages/cattr/_compat.py", line 86, in <module>
    from typing import _Union
ImportError: cannot import name '_Union' from 'typing' (/Users/causey/.pyenv/versions/3.8.0/lib/python3.8/typing.py)
Subprocess exited with error 1

Any ideas? Thanks!

Documentation showing confusing picture

At 4. Connect the Microcontroller to Your Laptop and Test Serial Communication the documentation shows the LED ring lit up. In almost all cases the LED ring did not turn on, leaving the participant puzzled since they though something was not working.
It would be better to show a picture with the LED ring off.

Cannot create user resources is IAM account password policy does not exist

Attempting to create user resources errors out with the following:

[WARNING] ... Error calling iam.get_account_password_policy() (will retry) for user cdduser, error: An error occurred (NoSuchEntity) when calling the GetAccountPasswordPolicy operation: The Password Policy with domain name ACCOUNT_ID cannot be found.

Need to add test for NoSuchEntity when getting the accounts password policy and if triggered, create a policy that aligns with the workshop policy.

reference to #11

Some bugs when running cdk synth

I found following bugs when running cdk synth:

  • cdk_app.py doesn't use the configured region but the hardcoded us-east-1 (line 60)
  • static_site_construct.py uses an invalid parameter called origin_access_identity_id when initializing SourceConfiguration (line 129)

Cannot login to my AWS account created on the workshop

Hi!

I forgot/lost some data needed to login to my aws console created on the workshop. I tried to get it from the url your provided on the workshop (wa.....io) however this page doesn't work anymore. Is it only a temporary error on the page? If not how can I get my account details again?

User resources fail to create when multiple submitting at same time - namely Cloud9

When users login in for first time and resource creation is kicked off, the waiting for resource times out. In some cases, the creation may have completed successfully, but in other cases, the Cloud9 environment was not created.

This does not seem to be an issue with low resource creation load, even with a lot of created resources.

  • Identify issue
  • resolve issue and test
  • verify that resource deletion works (increase timeout on Lambda to 15m)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.