Code Monkey home page Code Monkey logo

appstream-serverless-image-creation-automation's Issues

WinRM Connection reset buy peer errors in AS2_Automation_Windows_FN02_Scripted_Install

Intermittent WinRM Connection reset buy peer errors in AS2_Automation_Windows_FN02_Scripted_Install:

[ERROR] ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 181, in lambda_handler
    install_application(s3_bucket, tempdir, host, user, password, 'SSMS')
  File "/var/task/lambda_function.py", line 50, in install_application
    result = session.run_ps(command)
  File "/opt/python/winrm/__init__.py", line 52, in run_ps
    rs = self.run_cmd('powershell -encodedcommand {0}'.format(encoded_ps))
  File "/opt/python/winrm/__init__.py", line 39, in run_cmd
    shell_id = self.protocol.open_shell()
  File "/opt/python/winrm/protocol.py", line 166, in open_shell
    res = self.send_message(xmltodict.unparse(req))
  File "/opt/python/winrm/protocol.py", line 243, in send_message
    resp = self.transport.send_message(message)
  File "/opt/python/winrm/transport.py", line 334, in send_message
    response = self._send_message_request(prepared_request, message)
  File "/opt/python/winrm/transport.py", line 339, in _send_message_request
    response = self.session.send(prepared_request, timeout=self.read_timeout_sec)
  File "/opt/python/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/opt/python/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)

These don't seem to be related to the lambda timeout or lambda RAM allocation.

Hardcoded Step function name is obscure

The hardcoded step function name AS2_Automation_Windows_Scripted_App_Install-${StackId} makes it difficult to differentiate between multiple imagebuilders.

State machine state definitions use input JSON incorrectly

Many of the Task States for the state machine created in the Windows CloudFormation use parameters from the "AutomationParameters" dictionary in the input JSON. for example:

"Check Builder Status (Create)": {
                  "Type": "Task",
                  "Resource": "arn:aws:states:::aws-sdk:appstream:describeImageBuilders",
                  "Parameters": {
                    "Names.$": "States.Array($.AutomationParameters.ImageBuilderName)"
                  },
                  "ResultPath": "$.BuilderStatus",
                  "Next": "Is Builder Created and Running?"
                },

This JSON path does not however match the actual input JSON. Example input data:

{
  "ExecutedVersion": "$LATEST",
  "Payload": {
    "AutomationParameters": {
      "ImageBuilderName": "Automated_Builder",
      "ImageBuilderType": "stream.standard.medium",
      ...

To get these States to function, I therefore had to update the parameters to include ".Payload" in the path:

"Parameters": {
                    "Names.$": "States.Array($.Payload.AutomationParameters.ImageBuilderName)"
                  },

Question about the manifests included in the sample applications

@JGrego-AWS First let me say that I am new to AppStream and this repo has saved me countless hours of work for which I am very thankful!

I have been working on deploying version 1.2 and I have noticed something in the sample application manifests that does not look quite right. In the PuTTYManifest.txt file there are two lines (76 and 123) that are for notepad++ and line 76 is not in the NotepadPPManifest.txt file.

76 c:\program files\notepad++\nppshell_06.dll
123 c:\windows\notepad.exe

If I am deploying just the Notepad++ application do I need to add line 76 to the NotepadPPManifest.txt file?

I am about to try deploying another application and I was wondering what is the best way to generate or create the manifest file?

Thanks,
John

Hardcoded path to AWS Secret prevents multiple deployments

Error on Notepad++ lambda funtion

Hi,

I followed the instructions from and created 2 VPC endpoints, one for secret manager and the other for S3 Interface.
When I ran the step functions, it ended with an exception:

[ERROR] ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 100, in lambda_handler result = session.run_ps(command) File "/opt/python/winrm/__init__.py", line 52, in run_ps rs = self.run_cmd('powershell -encodedcommand {0}'.format(encoded_ps)) File "/opt/python/winrm/__init__.py", line 41, in run_cmd rs = Response(self.protocol.get_command_output(shell_id, command_id)) File "/opt/python/winrm/protocol.py", line 449, in get_command_output self._raw_get_command_output(shell_id, command_id) File "/opt/python/winrm/protocol.py", line 468, in _raw_get_command_output res = self.send_message(xmltodict.unparse(req)) File "/opt/python/winrm/protocol.py", line 243, in send_message resp = self.transport.send_message(message) File "/opt/python/winrm/transport.py", line 334, in send_message response = self._send_message_request(prepared_request, message) File "/opt/python/winrm/transport.py", line 339, in _send_message_request response = self.session.send(prepared_request, timeout=self.read_timeout_sec) File "/opt/python/requests/sessions.py", line 697, in send r.content File "/opt/python/requests/models.py", line 836, in content self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b'' File "/opt/python/requests/models.py", line 761, in generate raise ChunkedEncodingError(e)

The image builder is enabled with internet acess

Thank you

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.