text:
Mounting local folder to /var/model appears broken

On review of the Dockerfile, I learn that:

the working folder of the image is set to /var/model
a volume mount is defined at /var/model
input .dsl files are expected by serve and generate-site operations to exist at /var/model

Therefore, I have included the -v [local folder]:/var/model option when running this image, yet the below always gives rise to a "File does not exist" error:
> ls
    Directory: C:\Projects\learning\c4

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        20/08/2022     14:55                .devcontainer
d-----        22/08/2022     18:37                puml
-a----        20/08/2022     16:13             41 .gitignore
-a----        20/08/2022     19:25           2516 amazon-web-service.dsl
-a----        22/08/2022     18:35            582 azure.dsl
-a----        20/08/2022     19:24          11841 big-bank.dsl
-a----        20/08/2022     16:10            234 build.sh
-a----        20/08/2022     19:23           6549 c4-dsl-extension.dsl
-a----        22/08/2022     18:43           2977 cookbook.dsl
-a----        20/08/2022     19:21           3248 financial-risk.dsl
-a----        22/08/2022     14:01            590 workspace-extension.dsl
-a----        20/08/2022     15:31            730 workspace.dsl

> docker run -it --rm -v /projects/learning/c4:/var/model ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 serve -w cookbook.dsl
Exception in thread "main" com.structurizr.dsl.StructurizrDslParserException: The file at /var/model/cookbook.dsl does not exist
        at com.structurizr.dsl.StructurizrDslParser.parse(StructurizrDslParser.java:119)
        at nl.avisi.structurizr.site.generatr.StructurizrUtilitiesKt.parseStructurizrDslWorkspace(StructurizrUtilities.kt:11)
        at nl.avisi.structurizr.site.generatr.ServeCommand.updateSite(ServeCommand.kt:50)
        at nl.avisi.structurizr.site.generatr.ServeCommand.execute(ServeCommand.kt:33)
        at kotlinx.cli.ArgParser.parse(ArgParser.kt:657)
        at kotlinx.cli.ArgParser.parse(ArgParser.kt:530)
        at nl.avisi.structurizr.site.generatr.AppKt.main(App.kt:13)

By running the image with -itd instead, and docker inspect [container id] > image-inspect.txt thereafter, the
attached image-inspect.txt file shows Docker's internals, specifically that the mounting itself worked.

Could this be a permission issue, since the image is running on USER 65532?
Could a new operation eg. list be created to list all files the container "sees" at /var/model?
Could this be absent documentation that explains how to use the image with local .dsl files?

For clarity, I'm running:

Windows 10 Home
WSL2
Windows Terminal 2

Hi @julrichkieffer, I think your problem is that in WSL, the C: drive is mounted under /mnt/c. See https://docs.microsoft.com/en-us/windows/wsl/file-permissions#accessing-files-in-the-windows-drive-file-system-drvfs-from-linux.
So your command should be:
docker run -it --rm -v /mnt/c/projects/learning/c4:/var/model ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 serve -w cookbook.dsl

I'm not sure if Homebrew works on WSL, but if it does, you could also install Structurizr Site Generatr using Homebrew. I would recommend to do that, because primary goal for the Docker image is to be used from a build pipeline.

Oh, and I now realize that the VOLUME and WORKDIR are probably slightly misleading. In reality there's no requirement that the model should be located in /var/model. You can mount it in any directory you like, as long as you specify the full path to the DSL file with the -w parameter.
Example:
docker run -it --rm -v /mnt/c/projects/learning/c4:/var/mycoolmodel ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 serve -w /var/mycoolmodel/cookbook.dsl

Hi @dirkgroot
My primary use case is to use this container in a build pipeline ::check:: But I first need to get it working on WSL2 as per my current dev environment ::cross::. The whole point of Docker containers is to be self-contained and poratble. So I dont want a dependency (ie Homebrew) that 1. isn't necessary, 2. already in the container, or 3. introduces a dependency into the CI pipeline.
I didn't remember, but totally agree that /mnt/c/... is the appropriate notation. However, owing to the ENTRYPOINT being set, I can only rely on structurizr-site-generatr to learn if my volume and -w paramters have any effect. This is why I suggested a list command, though it may be future proof to instead have an inspect command return a json result that inludes an array of files in the workspace. Future needs can extend the json response without affecting the API.
Currently, no matter what combination of volume and workspace paths I supply, the same error (as above) is returned.

Hi @dirkgroot
Good news!
By removing the structurizr-site-generatr and ENTRYPOINT commands, I found the mounted volume over WSL and file access (with USER 65532) is succesful.  Here's my triage process:

Create a new Dockerfile, commenting out the structurizr-site-generatr installation and ENTRYPOINT commands. Although not required, but as suggested earlier, I appended a default CMD ["ls", "-lah"] command, which means you'll see a formatted list of the files in the mounted /var/model by default. See attached.

I built a local image with docker build -t generatr/local:latest . Notice the image generatr/local is used from hereon

I ran the local image, and the mounted volume's content is returned as expected:

> docker run -it --rm -v c:/projects/learning/c4:/var/model generatr/local

drwxrwxrwx 1 root root 4.0K Aug 25 17:24 .
drwxr-xr-x 1 root root 4.0K Aug 25 16:56 ..
-rw-r--r-- 1 1000 1000 2.5K Aug 20 18:25 amazon-web-service.dsl
-rw-r--r-- 1 1000 1000  582 Aug 22 17:35 azure.dsl
-rw-r--r-- 1 1000 1000  12K Aug 20 18:24 big-bank.dsl
-rwxr-xr-x 1 1000 1000  234 Aug 20 15:10 build.sh
-rw-r--r-- 1 1000 1000 6.4K Aug 20 18:23 c4-dsl-extension.dsl
-rw-r--r-- 1 1000 1000 3.0K Aug 22 17:43 cookbook.dsl
drwxrwxrwx 1 root root 4.0K Aug 20 13:55 .devcontainer
-rwxrwxrwx 1 root root  542 Aug 25 17:17 Dockerfile
-rw-r--r-- 1 1000 1000 3.2K Aug 20 18:21 financial-risk.dsl
-rwxrwxrwx 1 root root   82 Aug 25 17:12 generatr-build.bat
-rw-r--r-- 1 1000 1000   41 Aug 20 15:13 .gitignore
-rwxrwxrwx 1 root root  19K Aug 23 12:33 image-inspect.txt
drwxr-xr-x 1 1000 1000 4.0K Aug 22 17:37 puml
-rw-r--r-- 1 1000 1000  730 Aug 20 14:31 workspace.dsl
-rw-r--r-- 1 1000 1000  590 Aug 22 13:01 workspace-extension.dsl

To check file read access across WSL2 to the local c:/projects/learning/c4 folder (with USER 65532):

> docker run -it --rm -v c:/projects/learning/c4:/var/model generatr/local cat azure.dsl

workspace {
    model {
        softwareSystem "Authentication Service" {
            tags "Microsoft Azure - Azure Active Directory"
        }
    }

    views {
                        systemLandscape {
                                        include *
                                        autoLayout lr
                        }

                        systemLandscape "Azure" {
                                !script groovy {
                                                view = workspace.views.getViewWithKey("Azure");
                                                workspace.model.softwareSystems.findAll {it.hasTag("Microsoft Azure - Azure Active Directory") }.each{ view.add(it); };
                                }
                                autolayout
                        }
        theme https://static.structurizr.com/themes/microsoft-azure-2021.01.26/theme.json
    }
}

Lastly, to check writing files from the container to the local c:/projects/learning/c4 folder (with USER 65532):

> docker run -it --rm -v c:/projects/learning/c4:/var/model generatr/local touch index.html
> ls

    Directory: C:\Projects\learning\c4

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        20/08/2022     14:55                .devcontainer
d-----        22/08/2022     18:37                puml
-a----        20/08/2022     16:13             41 .gitignore
-a----        20/08/2022     19:25           2516 amazon-web-service.dsl
-a----        22/08/2022     18:35            582 azure.dsl
-a----        20/08/2022     19:24          11841 big-bank.dsl
-a----        20/08/2022     16:10            234 build.sh
-a----        20/08/2022     19:23           6549 c4-dsl-extension.dsl
-a----        22/08/2022     18:43           2977 cookbook.dsl
-a----        25/08/2022     18:17            542 Dockerfile
-a----        20/08/2022     19:21           3248 financial-risk.dsl
-a----        25/08/2022     18:12             82 generatr-build.bat
-a----        23/08/2022     13:33          19188 image-inspect.txt
-a----        25/08/2022     18:31              0 index.html
-a----        22/08/2022     14:01            590 workspace-extension.dsl
-a----        20/08/2022     15:31            730 workspace.dsl

Which means I've exluded WSL2, volume mounts, and file read or writing operations from within the container as the source of the runtime exception. So I think the issue lies within structurizr-site-generatr (or the Java runtime) itself.

Hi @julrichkieffer, thanks for your research! I don't use Windows, so I can't easily reproduce your issue myself, so your input is really helpful!
In your previous attempt you have been using /projects/learning/c4 and /mnt/c/projects/learning/c4 to specify the host path with the -v argument. You now have seen a working volume mount by using c:/projects/learning/c4 as the host path. Upon doing some more research this makes sense, because Docker's documentation on volume mounts states:

On Windows, the paths must be specified using Windows-style semantics.

Just double checking: Did you also attempt to use c:/projects/learning/c4 with the structurizr-site-generatr Docker image? If you did, what's the exact error message you get?
Like this:
> docker run -it --rm -v c:/projects/learning/c4:/var/model ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 serve -w workspace.dsl

Or like this:
> docker run -it --rm -v c:/projects/learning/c4:/var/model ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 serve -w /var/model/workspace.dsl

Hi @dirkgroot
Yes, to do the WSL2 triage yesterday I removed as much "magic" as I could. So I used full absolute paths instead.
And again, good news!  By applying the full path to the volume mount, we get farther with ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 but with a new runtime (java) error:
> docker run -it --rm -v c:/projects/learning/c4:/var/model ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 serve -w cookbook.dsl

Generating diagrams...
PetClinic-Dynamic-001...
Development-Deployment...
landscape...
PetClinic-SystemContext...
PetClinic-Container...
Production-Deployment...
PetClinic-WebApplication-Component...
Generating site...
Successfully generated diagrams and site
Starting server...
[main] INFO org.eclipse.jetty.server.Server - jetty-11.0.11; built: 2022-06-21T21:42:55.454Z; git: 58487315cb75e0f5c81cc6fa50096cbeb3b9554e; jvm 18.0.2+9
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@62ea3440{/,null,AVAILABLE}
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@299321e2{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
[main] INFO org.eclipse.jetty.server.Server - Started Server@45905bff{STARTING}[11.0.11,sto=0] @20306ms
Server started
Open http://localhost:8080 in your browser to view the site
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()" because the return value of "java.io.File.getParentFile()" is null
        at nl.avisi.structurizr.site.generatr.ServeCommand.startWatchService(ServeCommand.kt:94)
        at nl.avisi.structurizr.site.generatr.ServeCommand.execute(ServeCommand.kt:35)
        at kotlinx.cli.ArgParser.parse(ArgParser.kt:657)
        at kotlinx.cli.ArgParser.parse(ArgParser.kt:530)
        at nl.avisi.structurizr.site.generatr.AppKt.main(App.kt:13)

.... the process locks (i.e. doesn't exit) here until I press ctrl+C to return to the command prompt (`>`).

Off course, the runtime error above is related to the serve operation. If instead I use the generate-site operation, we get success 🥇 :
> docker run -it --rm -v c:/projects/learning/c4:/var/model ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 generate-site -w cookbook.dsl

PetClinic-Dynamic-001...
PetClinic-SystemContext...
Production-Deployment...
landscape...
Development-Deployment...
PetClinic-WebApplication-Component...
PetClinic-Container...

In trying my other .dsl files using serve, some give the same mixed response -- generated output but locks after runtime error -- and others fail with other exceptions owing to !script or other issues arrising from the .dsl content itself. That is, once we get past the above runtime exception and locking, we still have some issues to remedy or Structurizr features to support.  But those are good problems to have :)
So to support your debugging, I've attached my c4 folder. I just copy-pasted .dsl files from several places -- to get a range of Structurizr features -- so there may be syntax errors in the .dsl.  It's only cookbook.dsl that I wrote from scratch myself by following the Structurizr Cookbook learning path, which is why I used it in earlier triage.

Hi @julrichkieffer, that's good news! The error message you got has already been fixed on main (see #33). You can work around it by specifying the full path to the workspace file, eg. /var/model/cookbook.dsl.
I'll look into the fonts directory that's being created, I've also seen that happen. It's definitely not part of the generated site, so you can safely ignore it.

Oh, and I'll look at the workspaces in the c4 folder you attached as well.

Ok.
I think the mounting issue is safely closed with some updated documentation which I'd be happy to write. But I suggest we create child issues from above's triage, so we don't lose each bug in here (however minor they may be).  For example, on looking at the build folder, although the images (puml and svg) are generated, only the Home and Systems html pages are generated -- not others.  I don't know if this is because the generator is failing silently, or because it expects all .dsl files to have a !docs docs entry.
But let me try with your suggestion, and report back....

Update on serve operation:
First, without exposing a port, you won't get networking. So I have updated the command, and found serve now works:
> docker run -it --rm -p 8080:8080 -v c:/projects/learning/c4:/var/model ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9 serve -w /var/model/cookbook.dsl

Generating diagrams...
landscape UP-TO-DATE
PetClinic-Dynamic-001 UP-TO-DATE
PetClinic-SystemContext UP-TO-DATE
Development-Deployment UP-TO-DATE
PetClinic-Container UP-TO-DATE
PetClinic-WebApplication-Component UP-TO-DATE
Production-Deployment UP-TO-DATE
Generating site...
Successfully generated diagrams and site
Starting server...
[main] INFO org.eclipse.jetty.server.Server - jetty-11.0.11; built: 2022-06-21T21:42:55.454Z; git: 58487315cb75e0f5c81cc6fa50096cbeb3b9554e; jvm 18.0.2+9
[main] INFO org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler@b1712f3{/,null,AVAILABLE}
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@332729ad{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
[main] INFO org.eclipse.jetty.server.Server - Started Server@34c01041{STARTING}[11.0.11,sto=0] @1552ms
Server started
Open http://localhost:8080 in your browser to view the site

But as explained just above, not all pages / navigation paths are generated. So HTTP 404 errors are returned when trying to drill down to actual workspace content:

I've had a quick look at the workspaces from your attachment. As a result, I've created 2 issues: #34 and #35. When I have more time, I'll look a bit more closely.
Thanks for your feedback so far, it's been really helpful! And feel free to create a PR with improved documentation on the volume mounting on WSL2.

I'm glad to partner with you to help / make things better. So thank you too.  👏
The bugs found during the triage above:

[ ] ENTRYPOINT in the Dockerfile prevents runtime triage. Instead, rather specify the same entrypoint as a default by using the CMD command instead
[ ] serve and generate-site operations lock (don't exit) when a runtime exception is unhandled
[ ] downloaded fonts needed by generate-site are found outside the build output folder
[ ] there's no way to set the output folder for the generate-site command
[ ] include port mapping (-p 8080:8080) in documentation of serve operation
[ ] runtime error unless the workspace is specified with a full path (e.g. serve -w /var/model/cookbook.dsl) inside the container. That is, container internals knowledge required.  Documentation needs updating to include this workaround.
[ ] mounting a local folder from Windows over WSL2 requires a full path. This is a known issue. However documentation here needs updating to reflect this
[ ] not all workspace views can be found in generated output despite .puml and .svg folders holding images as expected. Does the generator require a !docs docs command in the workspace .dsl?
[ ] Structurizr !script command not yet supported

A few quick remarks:

[ ]  ENTRYPOINT in the Dockerfile prevents runtime triage. Instead, rather specify the same entrypoint as a default by using the CMD command instead

The entrypoint can be overridden using the --entrypoint argument of docker run. I think this is sufficient for runtime triage. For example:
> docker run -it --rm -v $(pwd)/model:/var/model --entrypoint bash ghcr.io/avisi-cloud/structurizr-site-generatr:1.0.9

[ ]  there's no way to set the output folder for the generate-site command

There is. You can use the --output-dir option. See structurizr-site-generatr generate-site --help.

[ ]  runtime error unless the workspace is specified with a full path (e.g. serve -w /var/model/cookbook.dsl) inside the container. That is, container internals knowledge required.  Documentation needs updating to include this workaround.

This has already been fixed on main. See #33.

[ ]  not all workspace views can be found in generated output despite .puml and .svg folders holding images as expected. Does the generator require a !docs docs command in the workspace .dsl?

I think this is caused by the issue described in #35.

[ ]  Structurizr !script command not yet supported

See #34.

[ ]  downloaded fonts needed by generate-site are found outside the build output folder

See #36.

authors: dirkgroot julrichkieffer

repo: avisi-cloud/structurizr-site-generatr


text:
[Bug] Die Abhängigkeit "Microsoft.Extensions.AI.Abstractions" kann nicht aufgelöst werden

Die Abhängigkeit "Microsoft.Extensions.AI.Abstractions" kann nicht aufgelöst werden. Verwendete Quelle(n): 'nuget.org', 'Microsoft Visual Studio Offline Packages' für alle Versionen >= 4.

What should this be?

Alle Versionen von OllamaSharp >= Version 4.0 haben diese Abhängigkeit. Wir können Deutsch kommunizieren.

Das kannst du auch anders formulieren, mir gefällt dein Ton nicht. Meine Fehlermeldungen sind ausreichend genau.
Zur Sache: Die Fehlermeldung wird ausgegeben, weil die Abhängigkeit nicht vorhanden ist und die Frage ist, welche Version von Visual Studio du verwendest. Ist es eine Preview Version, Professional, Community? Denn Microsoft.Extensions.AI ist selbst relativ neu und ich habe nur etwas von einer Preview Version gelesen.

source: gharchive/issue

authors: ErfolgreichCharismatisch awaescher

repo: awaescher/OllamaSharp

license: MIT

license_type: permissive

license_source: github-api


text:
Sticky auto rotation breaking when using actions that require other friendly targets

When using actions that require another target such as Nascent Flash the auto combo stops for a short amount of time.
Cheers for this plugin! I love it.

Couldn't reproduce - how exactly do you use it? FWIW I use 'smart-targeting' for things like nascent flash or shirk (it casts at friendly mouseover or at co-tank). Do you actually switch targets? In such case I imagine autorotation would stop until you target enemy again (because that's how it works, at least for now - it always attacks main target).

You can already toggle any config by command, see /vbm cfg

authors: Dedoooo awgil


text:
Prettier 3.4

Added support for prettier 3.4.x
Not sure if you want an updated change log now, or after review. I decided to do that if you approve the PR and want me to update the change log file.

Thanks for this! I'll merge this assuming the tests all pass. Don't worry about the changelog, I'll update that when I publish the next release.

source: gharchive/pull-request

authors: awmottaz rgant

repo: awmottaz/prettier-plugin-void-html


text:
Put all the prior dataframes into a single obj

And make find_node_tips into a class.
There is some substantial renaming going on here. I hope that's OK @awohns . Do suggest better names for functions and classes if you can think of any.

Lots of awesome-looking changes in here!! I'll review it tomorrow. Might be easiest to go over it together if you'll be in?

Yep, I'm in tomorrow. Chat then.

authors: awohns hyanwong

repo: awohns/tsdate


text:
Failed to parse URL from undefinedget_page_config?page_type=home

Environment information
TypeError: Failed to parse URL from undefinedget_page_config?page_type=home

Describe the bug
Sometimes my Environment Variables not being carried over and throws this error. Have tried setting them in my next.config still the same
Any help would be highly appreciated
Reproduction steps
when try to open the web app

@anushkagarg56 👋 , thanks for reaching out. Can you try the steps outlined here to ensure the environment variables are accessible to the compute runtime?

Closing the thread as we have shared the documentation for setting up env variables for the SSR runtime.

repo: aws-amplify/amplify-backend


text:
amplify mock api does not work with IAM auth rules, always Unauthorized

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v16.6.1
Amplify CLI Version
7.5.2
What operating system are you using?
Mac
Amplify Categories
api
Amplify Commands
Not applicable
Describe the bug
Queries and mutations with IAM @auth are failing with Not Authorized to access exception.
I created a fresh project to test out the new Amplify release 7.5.2. Used this graphQL model:
type Test
  @model
  @auth(rules: [
    { provider: iam, allow: private },
    { provider: userPools, allow: private, operations: [read] }
  ])
{
  id: ID!

  writeable: String
    @auth(rules: [
      { provider: iam, allow: private },
      { provider: userPools, allow: private, operations: [read, update] }
    ])

  readOnly: String

  hidden: String
    @auth(rules: [
      { provider: iam, allow: private },
    ])
}

Using AWS AppSync console, run this query:
query MyQuery {
  listTests {
    items {
      id
    }
  }
  getTest(id: "1") {
    id
  }
}

When I run this query as a UserPool user, I get back some data. When I run this query as IAM, I get this exception:
{
  "data": {
    "listTests": null,
    "getTest": null
  },
  "errors": [
    {
      "path": [
        "getTest"
      ],
      "data": null,
      "errorType": "Unauthorized",
      "errorInfo": null,
      "locations": [
        {
          "line": 7,
          "column": 3,
          "sourceName": null
        }
      ],
      "message": "Not Authorized to access getTest on type Test"
    },
    {
      "path": [
        "listTests"
      ],
      "data": null,
      "errorType": "Unauthorized",
      "errorInfo": null,
      "locations": [
        {
          "line": 2,
          "column": 3,
          "sourceName": null
        }
      ],
      "message": "Not Authorized to access listTests on type ModelTestConnection"
    }
  ]
}

As a sanity check, I have verified that IAM should have full access to queries:

The above unauthorized exception also happens for IAM createTest() mutation. (And might also happen for other mutations and subscriptions, I haven't tested everything).
Expected behavior
IAM queries and mutations succeed, returning either some date or null if there is no data.
Reproduction steps

amplify init
amplify add auth
amplify add api

Set UserPool as primary auth and IAM as secondary auth.

use graphQL Test model as above
amplify push
create a test UserPool user in Cognito
open AWS AppSync console and run the sample query as above

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line

Additional information
No response

This is an issue for us as well.  Tried the mock credentials. mock API_KEY works but our schema authorization bars us from using it.

I'm also trying to get the local ( mocked ) version of the API to work.  using
type Team @model @auth(rules : [{ allow: private, provider: iam}]) {
  id: ID!
  name: String!
  description: String
}

Not sure how to inject the mock auth based on the discussion above, at least through any of the exposed Amplify APIs.

I was able to test my lambda locally by creating an accessKey in IAM for my authorized user in custom-rules.json. With that in my request I put:
 credentials = {
                accessKeyId: "USER_ACCESS_KEY_ID",
                secretAccessKey: "USER_SECRET_ACCESS_KEY,
            }

Was the custom-role mock issue solved somehow - I think this will be a much better solution.

Hi there - just stumbled across this issue. My backend contains a few different lambdas that access AppSync directly by using the "admin roles" functionality mentioned above. This all works well when deployed. However, I get unauthorised when trying to hit the amplify mock APIs locally. After a bit of digging I'm pretty sure it is because my models intentionally do not contain { allow: private, provider: iam }, as doing so would allow authenticated users access to my API models, which I definitely do not want. I can get things to work by using the ASIAVJKIAM-AuthRole access key but only if I also add { allow: private, provider: iam } to my models, which is undesirable.
The ideal solution would be to be able to specify a custom user ARN for accessing the mock APIs locally, which would enable me to fake my local requests as one of my allowed admin user ARNs
Any help / assistance appreciated

authors: Itai-deepdub abstractalchemist charlesfayal jvaczcorporation skryshi

repo: aws-amplify/amplify-category-api


text:
Parameters: [s3Key, deploymentBucketName] missing from lambda function resources in team-provider-info.json

How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v14.19.0
Amplify CLI Version
10.6.1
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
After the issue occurred, amplify-meta.json has been edited and uploaded to the deployment bucket (i.e. the bucket specified in deploymentBucketName, inside team-provider-info.json), in an attempt to see whether running amplify pull after this will download the newly edited file: it does not.
Describe the bug
Parameters: [s3Key, deploymentBucketName] are missing inside team-provider-info.json, for lambda function resources managed by Amplify. Running amplify pull and amplify env pull does not update this information.
This results in a "Parameters: [s3Key, deploymentBucketName] must have values" error when attempting to push changes to these resources through amplify push.
Expected behavior
For parameters: [s3Key, deploymentBucketName] inside team-provider-info.json to be populated upon running amplify pull or amplify env pull. Successful push of changes to these resources.
Reproduction steps
Unfortunately was unable to reproduce this issue with another project, but for this particular project in this specific account:

Run amplify pull to pull this specific project, with backend resources
Perform some changes to one of the lambda function resources (e.g. through amplify update function)
Run amplify push

Project Identifier
1a7997cb95a57bbd0b696159e8a0eaf3
Log output

# Put your logs below this line

Additional information
Manually editing team-provider-info.json to fill it with the expected parameters: [s3Key, deploymentBucketName] (by going through the deployment bucket and copying object keys) fixes this issue. However, I require a way to fix this without having to manually edit this file myself.
Before submitting, please confirm:

[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.

Hey @guyvanit :wave: thanks for raising this! Are you using the git-connected workflow with Amplify Hosting by chance?
Additionally, were you noticing this issue on functions that you had previously pushed or is this a brand new function?

Hi!
I'm not using git-connected workflow with Amplify Hosting for this project. To deploy the project, I manually deploy through Amplify CLI commands from a CodeBuild.
The issue occurred on functions created previously.
Thank you!

Hey @guyvanit apologies for the delay here. Are you still experiencing this issue? Was the amplify-meta.json file manually edited and uploaded to the deployment bucket after experiencing this issue for the first time -- in an attempt to remediate? Were these affected Function resources merged over from another git branch/Amplify environment?
Running amplify env checkout <current-env-name> will refresh the values found in amplify-meta.json with the values from amplify/backend-config.json. Are you able to run this command and get different results?

Hi!
Unfortunately, this issue still persists for this specific project and account. I tested this both pre and post-upgrade to amplify CLI version 10.7.3. Note that although I still experience this issue, I also found that the issue can be resolved by re-creating the Amplify project (i.e. deleting the project from AWS Console, then re-deploy the whole project). I'm simply keeping my previous project with this issue up to be able to reproduce this error.
To answer your questions:

The amplify-meta.json file was indeed manually edited and uploaded after experiencing this issue for the first time, in an attempt to mitigate this issue - this was done alongside the AWS Support Team.
These resources are indeed from another Amplify environment. The Amplify project and its source code were created in another AWS account and uploaded to a Git repo (without project-config.json). These files are then loaded within a deployment pipeline to be deployed to various different AWS accounts.
Running amplify env checkout <current-env-name> unfortunately did not solve the issue.

Hey @guyvanit was this Lambda function previously deployed to this account and environment, but the s3key was not added to the team-provider-info.json? Or is this a case where the function was added, merged over to another environment, and built with Amplify Hosting?

Hi,
This lambda function was previously deployed to this account and environment before, but the copy of team-provider-info.json for this particular account and environment was not kept. Upon the attempted generation of a new team-provider-info.json file for this particular account and environment through amplify pull, the s3key was not found.

Hey @guyvanit was the team-provider-info file not kept up due to a merge? In any event, though, we can try manually patching in the corresponding s3key by creating a parameter in SSM Parameter Store, then adding this key=value pair to the team-provider-info file, and lastly add the parameter to amplify/backend/backend-config.json. You can refer to this doc for more info around creating the parameter https://docs.amplify.aws/cli/reference/ssm-parameter-store/
Additionally, it may be easier to remove and re-add the function with the same name

Closing due to inactivity. @guyvanit if you are still experiencing this please reply back to this thread and we can can re-open this issue to investigate further

authors: guyvanit josefaidt

repo: aws-amplify/amplify-cli


text:
Git pull resets amplify-meta.json

Describe the bug
I have 2 envs, namely prod and dev. While i work in dev i type amplify status and no change is reported in any of the services.  Then i type amplify push and it confirms that no change is needed. when i press then later amplify env pull the amplify-meta.json is resetted and i have to copy the content from #current-cloud-backend in order to reverse the resetting of services.
The error that i receive then is as following:
× There was an error initializing your environment.
2019-06-16T18:00:02.274Z - error: uncaughtException: Cannot read property 'DeploymentBucketName' of undefined
To Reproduce
Steps to reproduce the behavior:

amplify push
amplify env pull

Expected behavior
In this case it should report as git, that the env is up to date
Desktop (please complete the following information):

OS: Windows 10

@fatjoni
What is the version of your locally installed amplify CLI?

@fatjoni You could use amplify env pull --restore to copy the #current-cloud-backend to backend.

I got the same error when I try to get an environment from amplify (AWS services) to my local machine...

authors: MontoyaAndres UnleashedMind fatjoni kaustavghosh06


text:
@connection and sorting direction

Which Category is your question related to?
GraphQL
Amplify CLI Version
v3.17.0
What AWS Services are you utilizing?
AppSync
Provide additional details e.g. code snippets
I find amplify documentation in it's simple form, confusing.
Get this schema
type Book @model {
    id: ID!
    title: String!
    prices: [Price]! @connection(name: "BookPrices", sortField: "validity", limit: 1)
}

type Price @model {
    price: Float!
    validity: AWSDateTime!
    book: Book! @connection(name: "BookPrices", sortField: "validity")
}

It's easy to define a query in graphiql (both on mock and production) that show a book and it's last price (by using the validity field as sort field).
query MyQuery {
  __typename
  getBook(id: "12345") {
    title
    prices(sortDirection: DESC) {
      items {
        price
        validity
      }
    }
  }
}

Now, I want to replicate the same query on my javascript app (it's an angular app written in typescript if that can help), but I don't know how, and I can't find any direction on amplify documentation.
Please help

After you generate the code with amplify codegen for angular project the CLI generates a src/app/API.service.ts file (with default settings) which contains all the default queries and mutations as callable code.
Based on that you can add your custom queries to other parts of the code wherever you like.
I'm closing the issue, but if something new comes up feel free to reopen it.

@attilah thanks for your response. What I cant find in documentation is how to create a custom query. Being a young tech, I can't find a tutorial on internet. Could you please point me in the right direction?

authors: artecoop attilah


text:
Granting access to objects in S3 bucket for authenticated users

** Which Category is your question related to? **
Accessing files in an S3 bucket
** What AWS Services are you utilizing? **
AWS Amplify with Auth added
** Provide additional details e.g. code snippets **
Hi!
I'm currently working on a React Native app that I am buildign with Amplify. I did add Auth and a GraphQL to the app and implemented both.
I am currently trying to load some images in my app that are hosted in an S3 bucket. These images are uploaded without public access since I only want to use them in the app. My guess was that I would have to add a new policy to the authenticated Auth role that can be found in amplify/.config/team-provider-info.json under AuthRoleArn.
So I did add the following policy to that role:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:GetObjectAcl",
                "s3:GetObject"
            ],
            "Resource": "arn:aws:s3:::BUCKETNAME/*"
        }
    ]
}

Unfortunately the images are not showing up in my app. Am I missing something?
Thank you in advance!

I will try that approach thank you.
Still I am wondering why my approach did not work. I will probably have a look at the what Storage does exactly. My current project only needs to read from an S3 bucket and setting up Storage seems a bit like an overkill.

Still I am wondering why my approach did not work. I will probably have a look at the what Storage does exactly. My current project only needs to read from an S3 bucket and setting up Storage seems a bit like an overkill.
The file amplify/.config/team-provider-info.json is auto generated is used only for reference. Adding policy to this file won't update the stack/policy

@yuth if he did want to add access to the bucket manually, then how would he go about doing so with Amplify?

authors: stephendmalloy timkuilman yuth


text:
Slow build cache even without cache defined

Before opening, please confirm:

[X] I have checked to see if my question is addressed in the FAQ.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

App Id
d2ebo35xq239sq
Region
us-east-1
Amplify Console feature
Build settings
Describe the bug
We used to have a cache configuration in our amplify.yml, however we were running into issues w/ the cache size so we removed the cache: configuration a few months back.
I noticed that our Amplify builds still seem to be taking a couple of minutes fetching and extracting a cache - is this normal (eg. if we had a project configured without cache from scratch) or is there a way to bypass this entirely to help speed up our deployments?
Here's what I see in the logs:
2021-05-12T13:18:49.361Z [INFO]: # Retrieving cache...
2021-05-12T13:20:09.557Z [INFO]: # Extracting cache...
2021-05-12T13:21:34.226Z [INFO]: # Extraction completed

AWS support suggested trying to add - envCache --set stackInfo "". I set this and deployed the project twice, however it didn't seem to provide any improvement.
Expected behavior
Cache retrieval / extraction should either not happen or be very fast if we have removed our cache config from amplify.yml.
It would be nice if there was some visibility into the contents of the build cache, and a way to explicitly clear it out through the console.
Reproduction steps

I'm not sure if it's a side effect of previously having a large cache, or simply having a large project that we're deploying (eg. are there any build artifacts that are cached by default without us explicitly defining them in amplify.yml?)

Build Settings
version: 0.1
frontend:
  phases:
    preBuild:
      commands:
        - nvm install
        - npm install -g yarn
        - nvm use
    build:
      commands:
        - export RELEASE=$(git rev-parse --short=10 HEAD)
        - nvm use
        - yarn install --production
        - yarn run build
        - sed -i -e "s/%SENTRY_RELEASE_ID%/${RELEASE}/" ./dist/index.html
        - export SENTRY_AUTH_TOKEN=$(aws ssm get-parameter --with-decryption --name=/next-wave/sentry_token --query=Parameter.Value --output=text)
        - |
          if [ -n \"${SENTRY_ENV}\" ] && [ \"${SENTRY_ENV}\" != \"NONE\" ]; then
            sentry-cli releases --org wavehq --project ${SENTRY_ENV}-next-wave files $RELEASE upload-sourcemaps ./dist || true
          fi
        - tar -czf prod.tar.gz -C dist .
  artifacts:
    baseDirectory: dist
    files:
      - '**/*'
  customHeaders:
    - pattern: '**/*'
      headers:
        - key: 'X-Backend'
          value: 'amplify'

    # Enable browser caching of static assets
    - pattern: '**/*.js'
      headers:
        - key: 'Cache-Control'
          value: 'public, max-age=2678400'
    - pattern: '**/*.css'
      headers:
        - key: 'Cache-Control'
          value: 'public, max-age=2678400'
    - pattern: '**/*.svg'
      headers:
        - key: 'Cache-Control'
          value: 'public, max-age=2678400'
    - pattern: '**/*.png'
      headers:
        - key: 'Cache-Control'
          value: 'public, max-age=2678400'

### Additional information

* AWS Support Case ID: 8331441271
* Our TAM is aware of the case / issue as well

Hi I looked into your builds and it appears we are still attempting to download the residual cache which is causing this latency.  We recently fixed the reason causing cache to continuously bloat in the first place.  We now automatically omit the node_modules/.cache directory (background here).  Although it sounds counterintuitive, perhaps the quickest fix is to actually add caching back to your build spec so the cache file shrinks down in size.  If that still doesn't help, we can manually delete the cache with your permission.

@behrooziAWS Thanks for checking in to that. We came across the FAQ entry and were just starting to experiment with it to see if it resolved our cache bloating issue - good to hear it should be resolved by default! I'll check with the team tomorrow about re-enabling the cache or if we'd want it deleted manually.
A few other notes:

Is this issue (downloading residual cache) considered a bug on your end? Would you expect it might be resolved in the future when removing the cache key or is it something we should always watch out for?
Some more visibility into the cache might've helped us discover this issue sooner. It was only when we looked through the build logs very closely that we noticed we were still spending a significant amount of time downloading the cache. Some ideas would be exposing some metrics on cache size, adding a way to download the cache artifact through the console so it can be inspected for contents (would be helpful for debugging other cache issues as well), or a way to empty the cache manually ourselves.
It would be nice if the new default behavior was updated in the FAQ? Are there other defaults like this or just node_modules/.cache?

Thanks for the quick response!

Yes, I would consider this a bug, I've made a note.
Thanks for your suggestions, we will consider them as a feature request. I believe today that cache size is logged during upload when cache is in the buildspec.
Yes, I'll update the FAQ.  .cache is the only omitted directory, but you can manually omit others using the syntax mentioned.  Additionally, we limit the max directory depth to 20 levels to prevent inadvertent cyclic symlinks causing out of memory errors.

@behrooziAWS Thanks!

I've updated the code so that if you remove the cache from your buildspec it doesn't download the old cached artifacts and updated the FAQ accordingly.

authors: behrooziAWS mwarkentin

repo: aws-amplify/amplify-console


text:
chore(adapter): change dependency to aws-swift-sdk based version of amplify

Issue #, if available: None
Description of changes: Change Amplify dependency to use aws-sdk-swift version [branch dev-preview-geo-updated]
Check points: (check or cross out if not relevant)
- [ ] Ran swiftformat (from repository root): swiftformat Sources Tests
- [ ] Ran swiftlint (from repository root): swiftlint Sources Tests and addressed all violations.
- [ ] Added new tests to cover change, if needed

[x] Build succeeds with all targets using Swift Package Manager
[x] All unit tests pass
[x] All integration tests pass
- [ ] Documentation update for the change if required
[x] PR title conforms to conventional commit style
- [ ] If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The main reason the tests are failing is the Xcode version in our .circleci/config.yml file. Xcode 13.0.0 thinks that Swift concurrency language features can only be used >= iOS 15.0. Since we're targeting iOS 13.0 and not using availability checks, the compiler is throwing all of those concurrency is only available in iOS 15.0.0 or newer errors. Xcode 13.3.1 is supported [source], so please bump to that.
Interestingly, running the HostApp UI tests results in a failure in AMLMapViewTestCase testMap(). It appears as though the double tap gesture isn't triggering a zoom. These changes shouldn't affect that though, so I'll take a closer look at what's going on there.

The main reason the tests are failing is the Xcode version in our .circleci/config.yml file. Xcode 13.0.0 thinks that Swift concurrency language features can only be used >= iOS 15.0. Since we're targeting iOS 13.0 and not using availability checks, the compiler is throwing all of those concurrency is only available in iOS 15.0.0 or newer errors. Xcode 13.3.1 is supported [source], so please bump to that.
Interestingly, running the HostApp UI tests results in a failure in AMLMapViewTestCase testMap(). It appears as though the double tap gesture isn't triggering a zoom. These changes shouldn't affect that though, so I'll take a closer look at what's going on there.

I tested the HostApp UI tests, seem to be passing in my machine.

Looks great, approved. But let's not merge this to main. Similar to Amplify iOS, we want to keep main as the current GA release. We should cut a dev-preview release from this branch.

authors: atierian thisisabhash

repo: aws-amplify/amplify-ios-maplibre


text:
chore(Model): API and DataStore integration test for scalars, lists, enums

Issue #, if available:
https://github.com/aws-amplify/amplify-ios/issues/314
Description of changes:
This adds integration tests for some models containing scalars, lists, lists with enums, etc.
Check points:

[x] Added new tests to cover change, if needed
[x] All unit tests pass
[x] All integration tests pass
[ ] Documentation update for the change if required
[x] PR title conforms to conventional commit style

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #1135 (509f07a) into main (35fb715) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1135      +/-   ##
==========================================
- Coverage   58.98%   58.97%   -0.02%
==========================================
  Files         652      652
  Lines       19209    19209
==========================================
- Hits        11331    11329       -2
- Misses       7878     7880       +2

Flag
Coverage Δ

API_plugin_unit_test
55.56% <ø> (ø)

AWSPluginsCore
76.56% <ø> (ø)

Amplify
48.04% <ø> (-0.05%)
:arrow_down:

Analytics_plugin_unit_test
73.41% <ø> (ø)

Auth_plugin_unit_test
82.31% <ø> (ø)

DataStore_plugin_unit_test
73.84% <ø> (ø)

Predictions_plugin_unit_test
33.51% <ø> (ø)

Storage_plugin_unit_test
57.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...Configuration/AmplifyAWSServiceConfiguration.swift
77.77% <ø> (ø)

Amplify/Categories/Hub/HubFilter.swift
52.63% <0.00%> (-5.27%)
:arrow_down:

...s/AWSHubPlugin/Internal/HubChannelDispatcher.swift
94.11% <0.00%> (-2.95%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f9ece2...509f07a. Read the comment docs.

authors: codecov-commenter lawmicha

repo: aws-amplify/amplify-ios


text:
[DRAFT] chore: amplify network package

Issue #

Description

created a new internal package with name AmplifyNetwork
move AppSyncRealTimeClient and WebSocketClient modules to AmplifyNetwork

General Checklist

[ ] Added new tests to cover change, if needed
[ ] Build succeeds with all target using Swift Package Manager
[ ] All unit tests pass
[ ] All integration tests pass
[ ] Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
[ ] Documentation update for the change if required
[ ] PR title conforms to conventional commit style
[ ] New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
[ ] If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report
Attention: Patch coverage is 93.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 71.14%. Comparing base (295521f) to head (797711a).
Report is 8 commits behind head on main.

Files
Patch %
Lines

...ubscriptionInterceptor/APIKeyAuthInterceptor.swift
50.00%
1 Missing :warning:

...r/SubscriptionInterceptor/IAMAuthInterceptor.swift
0.00%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3583      +/-   ##
==========================================
+ Coverage   68.42%   71.14%   +2.71%
==========================================
  Files        1077      992      -85
  Lines       36294    32855    -3439
==========================================
- Hits        24835    23375    -1460
+ Misses      11459     9480    -1979

Flag
Coverage Δ

API_plugin_unit_test
67.65% <93.33%> (+0.15%)
:arrow_up:

AWSPluginsCore
66.90% <ø> (ø)

Amplify
48.23% <ø> (+0.12%)
:arrow_up:

Analytics_plugin_unit_test
?

Auth_plugin_unit_test
79.03% <ø> (-0.02%)
:arrow_down:

CoreMLPredictions_plugin_unit_test
59.44% <ø> (ø)

DataStore_plugin_unit_test
81.37% <ø> (-1.00%)
:arrow_down:

Geo_plugin_unit_test
70.75% <ø> (ø)

Logging_plugin_unit_test
62.87% <ø> (ø)

Predictions_plugin_unit_test
?

PushNotifications_plugin_unit_test
87.13% <ø> (ø)

Storage_plugin_unit_test
77.61% <ø> (ø)

unit_tests
71.14% <93.33%> (+2.71%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

repo: aws-amplify/amplify-swift


text:
Add Ryan to ApplicationAutoscaling Repo Owners

Description of changes:
Add Ryan to ApplicationAutoscaling Repo Owners
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@surajkota PR cannot be merged if verify-owners plugin doesn't succeed. @ryansteakley need to make his membership public

/verify-owners

authors: A-Hilaly mbaijal ryansteakley


text:
feat: handle unrecoverable errors

Issue #, if available:
Description of changes:
If an unrecoverable error happens in bridge's mqtt5 client, bubble the error up to the component level
Why is this change necessary:
In bridge's mqtt5 client, if we perform a reset, due to client certs or CA certs rotating, there's a chance that creating the new CRT client will fail.  However, I'm unsure of the exact failure mode.  Presumably the only thing in greengrass' control is the certs it configures the CRT client with, that are taken from CDA.  This would fail if certs provided by CDA are malformed, which in theory would never happen.  So if CRT client creation throws an exception, we can either 1) retry (likely wasteful), or 2) log and do nothing (bad), 3) error bridge.  My thinking is that it would be worth erroring the component so that the customer can be notified and fix the issue, since it doesn't appear that recovery within bridge would happen.
How was this change tested:
Any additional information or context required to review the change:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Ultimately, using serviceErrored is bad. It will cause the bridge to become broken and not recover. We do need to retry forever, with some appropriate backoff.

Ultimately, using serviceErrored is bad. It will cause the bridge to become broken and not recover. We do need to retry forever, with some appropriate backoff.

Yeah the only reason for proposing this was because it didn't seem like retrying would actually help with recovery so service error would surface the issue more easily.  But yeah retrying forever works too and is certainly simpler :P
Will close this


text:
Update: tighten security with private subnet & encryption

Issue #, if available:
n/a
Description of changes:

Split cluster deployment to private subnet, ALB in public subnet
Add EBS encryption to the Consul server
Add ContainerInsight to ECS cluster

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

LGTM 🚢

authors: paragbhingre wellsiau-aws


text:
OError: [Errno 2] No such file or directory: '/home/ubuntu/.docker/config.json

python setup.py  -m setup -r us-west-1
INFO:main:Mode: setup
INFO:botocore.credentials:Found credentials in shared credentials file: ~/.aws/credentials
ERROR:main:An error occurred (AccessDenied) when calling the CreateRole operation: User: arn:aws:iam::638370140697:user/Sudhakar is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::638370140697:role/sudhakar
Traceback (most recent call last):
File "setup.py", line 632, in
main()
File "setup.py", line 622, in main
setup_results = setup(project_name=project_name, service_list=service_list, region=region)
File "setup.py", line 294, in setup
docker_login_config()
File "setup.py", line 252, in docker_login_config
with open(filename, 'r+') as f:
IOError: [Errno 2] No such file or directory: '/home/ubuntu/.docker/config.json'
Please help me what i am doing wrong..
I have changed "MicroECSServiceRole"  to sudhakar my name

You can try to login to your Docker account first to create ".docker/config.json" file
$docker longin

authors: mhdbashar sudhakarVuppalapati


text:
[BUG] Slurm commands failing on RHEL 8 RES DCV hosts connecting to RHEL 8 cluster

Describe the bug
This used to work, but when I run the prebuilt RHEL8 Slurm commands from the head node I get the following error:
squeue: error: PluginDir: /opt/slurm/lib/slurm: No such file or directory
squeue: error: Bad value "/opt/slurm/lib/slurm" for PluginDir
squeue: fatal: Unable to process configuration file

This works now. Fixed by always recompiling slurm on login nodes.

repo: aws-samples/aws-eda-slurm-cluster


text:
Add AZ failure: EKS

See rudpot/scenario-az branch for existing work

@rudpot , I will pick this up.

authors: abhishekjawali rudpot


text:
Cannot hit docker container using end point

Hello I am having trouble following the documentation on the readMe file, below are the steps I follow
Steps to reproduce:

Get dependencies

:
mvn package

Run docker container :

docker run -p 8000:8000 amazon/dynamodb-local
Output:
Initializing DynamoDB Local with the following configuration:
Port:   8000
InMemory:       true
DbPath: null
SharedDb:       false
shouldDelayTransientStatuses:   false
CorsParams:

Checking...

docker ps
CONTAINER ID        IMAGE                   COMMAND                  CREATED              STATUS              PORTS                    NAMES
340025693b3a        amazon/dynamodb-local   "java -jar DynamoDBL…"   About a minute ago   Up About a minute   0.0.0.0:8000->8000/tcp   modest_mahavira

Start api:

sam local start-api --env-vars src/test/resources/test_environment_windows.json
Output:
2019-06-07 06:01:01 Found credentials in shared credentials file: ~/.aws/credentials
2019-06-07 06:01:01 Mounting GetOrderFunction at http://127.0.0.1:3000/orders/{order_id} [GET]
2019-06-07 06:01:01 Mounting CreateOrdersTableFunction at http://127.0.0.1:3000/_create_orders_table [POST]
2019-06-07 06:01:01 Mounting GetOrdersFunction at http://127.0.0.1:3000/orders [GET]
2019-06-07 06:01:01 Mounting DeleteOrderFunction at http://127.0.0.1:3000/orders/{order_id} [DELETE]
2019-06-07 06:01:01 Mounting CreateOrderFunction at http://127.0.0.1:3000/orders [POST]
2019-06-07 06:01:01 Mounting UpdateOrderFunction at http://127.0.0.1:3000/orders/{order_id} [POST]
2019-06-07 06:01:01 You can now browse to the above endpoints to invoke your functions. You do not need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatical
ly. You only need to restart SAM CLI if you update your AWS SAM template
2019-06-07 06:01:01  * Running on http://127.0.0.1:3000/ (Press CTRL+C to quit)

Try hitting http://localhost:3000/orders,

Errors  out saying :
software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: docker.for.windows.localhost
Expected result:
To work as documented

My system info:

OS Name	Microsoft Windows 10 Pro
Version	10.0.17134 Build 17134
Other OS Description 	Not Available
OS Manufacturer	Microsoft Corporation
System Name	DESKTOP-FC3Q9EQ
System Manufacturer	Dell Inc.
System Model	Inspiron 15 7000 Gaming
System Type	x64-based PC
System SKU	0798
Processor	Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz, 2801 Mhz, 4 Core(s), 8 Logical Processor(s)
BIOS Version/Date	Dell Inc. 1.9.0, 1/10/2019
SMBIOS Version	3.0
Embedded Controller Version	255.255
BIOS Mode	UEFI
BaseBoard Manufacturer	Dell Inc.
BaseBoard Model	Not Available
BaseBoard Name	Base Board
Platform Role	Mobile
Secure Boot State	On
PCR7 Configuration	Elevation Required to View
Windows Directory	C:\WINDOWS
System Directory	C:\WINDOWS\system32
Boot Device	\Device\HarddiskVolume1
Locale	United States
Hardware Abstraction Layer	Version = "10.0.17134.765"
User Name	DESKTOP-FC3Q9EQ\sgg35
Time Zone	Eastern Daylight Time
Installed Physical Memory (RAM)	16.0 GB
Total Physical Memory	15.9 GB
Available Physical Memory	5.81 GB
Total Virtual Memory	18.2 GB
Available Virtual Memory	2.98 GB
Page File Space	2.38 GB
Page File	C:\pagefile.sys
Kernel DMA Protection	Off
Virtualization-based security	Running
Virtualization-based security Required Security Properties
Virtualization-based security Available Security Properties	Base Virtualization Support, Secure Boot, DMA Protection, Mode Based Execution Control
Virtualization-based security Services Configured
Virtualization-based security Services Running
Device Encryption Support	Elevation Required to View
A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Docker version:

Docker version 18.09.2, build 6247962

sam cli:

SAM CLI, version 0.16.0

Complete stack trace:

Fetching lambci/lambda:java8 Docker container image......
2019-06-07 06:07:26 Mounting D:\Temp\tmpea9_931o as /var/task:ro,delegated inside runtime container
Jun 07, 2019 10:07:28 AM com.fasterxml.jackson.databind.ext.Java7Support <clinit>
WARNING: Unable to load JDK7 types (annotations, java.nio.file.Path): no Java7 support added
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
?[32mSTART RequestId: 6744a18e-e17b-4c0a-a0d1-d815149dc554 Version: $LATEST?[0m
?[31msoftware.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: docker.for.windows.localhost
        at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:93)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.handleThrownException(RetryableStage.java:170)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.execute(RetryableStage.java:123)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:69)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:49)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)
        at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:57)
        at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:42)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:25)
        at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:283)
        at software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:91)
        at software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:103)
        at software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:68)
        at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:44)
        at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:53)
        at software.amazon.awssdk.services.dynamodb.DefaultDynamoDbClient.scan(DefaultDynamoDbClient.java:2456)
        at com.amazonaws.dao.OrderDao.getOrders(OrderDao.java:152)
        at com.amazonaws.handler.GetOrdersHandler.handleRequest(GetOrdersHandler.java:64)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
Caused by: java.net.UnknownHostException: docker.for.windows.localhost
        at java.net.InetAddress.getAllByName0(InetAddress.java:1281)
        at java.net.InetAddress.getAllByName(InetAddress.java:1193)
        at java.net.InetAddress.getAllByName(InetAddress.java:1127)
        at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at software.amazon.awssdk.http.apache.internal.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:80)
        at com.sun.proxy.$Proxy0.connect(Unknown Source)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
        at software.amazon.awssdk.http.apache.internal.impl.ApacheSdkHttpClient.execute(ApacheSdkHttpClient.java:72)
        at software.amazon.awssdk.http.apache.ApacheHttpClient.execute(ApacheHttpClient.java:200)
        at software.amazon.awssdk.http.apache.ApacheHttpClient.access$400(ApacheHttpClient.java:92)
        at software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:178)
        at software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:175)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.executeHttpRequest(MakeHttpRequestStage.java:58)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:50)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:34)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.doExecute(RetryableStage.java:145)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.execute(RetryableStage.java:111)
        ... 22 more
?[0m
?[32mEND RequestId: 6744a18e-e17b-4c0a-a0d1-d815149dc554?[0m
?[32mREPORT RequestId: 6744a18e-e17b-4c0a-a0d1-d815149dc554     Duration: 6583.42 ms    Billed Duration: 6600 ms        Memory Size: 128 MB     Max Memory Used: 8 MB   ?[0m
2019-06-07 06:07:41 Invalid API Gateway Response Keys: {'stackTrace', 'errorType', 'errorMessage', 'cause'} in {'errorMessage': 'Unable to execute HTTP request: docker.for.windows.localhost', 'errorType': 'soft
ware.amazon.awssdk.core.exception.SdkClientException', 'stackTrace': ['software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:93)', 'software.amazon.awssdk.core.inter
nal.http.pipeline.stages.RetryableStage$RetryExecutor.handleThrownException(RetryableStage.java:170)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.execute(RetryableSt
age.java:123)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:69)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(Retr
yableStage.java:49)', 'software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.ht
tp.StreamManagingStage.execute(StreamManagingStage.java:57)', 'software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:42)', 'software.amazon.awssdk.core.internal.http.pip
eline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.exe
cute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)', 'software.am
azon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:25)', 'software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$
RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:283)', 'software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:91)', 'software.amazon.awssdk.core.client
.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:103)', 'software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:68)', 'software.amazon.awssdk.core.c
lient.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:44)', 'software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:53)', 'software.amazon.awssdk.ser
vices.dynamodb.DefaultDynamoDbClient.scan(DefaultDynamoDbClient.java:2456)', 'com.amazonaws.dao.OrderDao.getOrders(OrderDao.java:152)', 'com.amazonaws.handler.GetOrdersHandler.handleRequest(GetOrdersHandler.jav
a:64)', 'sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)', 'sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)', 'sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin
gMethodAccessorImpl.java:43)', 'java.lang.reflect.Method.invoke(Method.java:498)'], 'cause': {'errorMessage': 'docker.for.windows.localhost', 'errorType': 'java.net.UnknownHostException', 'stackTrace': ['java.n
et.InetAddress.getAllByName0(InetAddress.java:1281)', 'java.net.InetAddress.getAllByName(InetAddress.java:1193)', 'java.net.InetAddress.getAllByName(InetAddress.java:1127)', 'org.apache.http.impl.conn.SystemDef
aultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)', 'org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)', 'org.apache.http.impl.conn.Pool
ingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)', 'sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)', 'sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
ssorImpl.java:62)', 'sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)', 'java.lang.reflect.Method.invoke(Method.java:498)', 'software.amazon.awssdk.http.apache.internal.conn
.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:80)', 'com.sun.proxy.$Proxy0.connect(Unknown Source)', 'org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClient
Exec.java:381)', 'org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)', 'org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)', 'org.apache.http.impl.client.Inte
rnalHttpClient.doExecute(InternalHttpClient.java:185)', 'org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)', 'org.apache.http.impl.client.CloseableHttpClient.execute(Closeable
HttpClient.java:56)', 'software.amazon.awssdk.http.apache.internal.impl.ApacheSdkHttpClient.execute(ApacheSdkHttpClient.java:72)', 'software.amazon.awssdk.http.apache.ApacheHttpClient.execute(ApacheHttpClient.j
ava:200)', 'software.amazon.awssdk.http.apache.ApacheHttpClient.access$400(ApacheHttpClient.java:92)', 'software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:178)', 'software.amazon.a
wssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:175)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.executeHttpRequest(MakeHttpRequestStage.java:58)', 'softwar
e.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:50)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRe
questStage.java:34)', 'software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.ht
tp.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineSta
ge.execute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)', 'software.amazon
.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$Retr
yExecutor.doExecute(RetryableStage.java:145)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.execute(RetryableStage.java:111)', 'software.amazon.awssdk.core.internal.ht
tp.pipeline.stages.RetryableStage.execute(RetryableStage.java:69)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:49)', 'software.amazon.awssdk.core.inter
nal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:
57)', 'software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:42)', 'software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineSta
ge.execute(RequestPipelineBuilder.java:205)', 'software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)', 'software.amazon
.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)', 'software.amazon.awssdk.core.internal.http.pipeline.stages.Execution
FailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:25)', 'software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient
.java:283)', 'software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:91)', 'software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHan
dler.java:103)', 'software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:68)', 'software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClient
Handler.java:44)', 'software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:53)', 'software.amazon.awssdk.services.dynamodb.DefaultDynamoDbClient.scan(DefaultDynamoD
bClient.java:2456)', 'com.amazonaws.dao.OrderDao.getOrders(OrderDao.java:152)', 'com.amazonaws.handler.GetOrdersHandler.handleRequest(GetOrdersHandler.java:64)', 'sun.reflect.NativeMethodAccessorImpl.invoke0(Na
tive Method)', 'sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)', 'sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)', 'java.lang.reflect.Method
.invoke(Method.java:498)']}}
2019-06-07 06:07:41 Function returned an invalid response (must include one of: body, headers or statusCode in the response object). Response received: {"errorMessage":"Unable to execute HTTP request: docker.fo
r.windows.localhost","errorType":"software.amazon.awssdk.core.exception.SdkClientException","stackTrace":["software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:93)"
,"software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.handleThrownException(RetryableStage.java:170)","software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage
$RetryExecutor.execute(RetryableStage.java:123)","software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:69)","software.amazon.awssdk.core.internal.http.pipeline.st
ages.RetryableStage.execute(RetryableStage.java:49)","software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.
amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:57)","software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:42)","software.amazon.a
wssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$Compos
ingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingSta
ge.java:37)","software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:25)","software.amazon.awssdk.core.internal.ht
tp.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:283)","software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:91)","software.ama
zon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:103)","software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:68)","software.
amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:44)","software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:53)","software
.amazon.awssdk.services.dynamodb.DefaultDynamoDbClient.scan(DefaultDynamoDbClient.java:2456)","com.amazonaws.dao.OrderDao.getOrders(OrderDao.java:152)","com.amazonaws.handler.GetOrdersHandler.handleRequest(GetO
rdersHandler.java:64)","sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)","sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)","sun.reflect.DelegatingMethodAccessorImpl.inv
oke(DelegatingMethodAccessorImpl.java:43)","java.lang.reflect.Method.invoke(Method.java:498)"],"cause":{"errorMessage":"docker.for.windows.localhost","errorType":"java.net.UnknownHostException","stackTrace":["j
ava.net.InetAddress.getAllByName0(InetAddress.java:1281)","java.net.InetAddress.getAllByName(InetAddress.java:1193)","java.net.InetAddress.getAllByName(InetAddress.java:1127)","org.apache.http.impl.conn.SystemD
efaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)","org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)","org.apache.http.impl.conn.Pool
ingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)","sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)","sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
orImpl.java:62)","sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)","java.lang.reflect.Method.invoke(Method.java:498)","software.amazon.awssdk.http.apache.internal.conn.Clie
ntConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:80)","com.sun.proxy.$Proxy0.connect(Unknown Source)","org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.ja
va:381)","org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)","org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)","org.apache.http.impl.client.InternalHttpCl
ient.doExecute(InternalHttpClient.java:185)","org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)","org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.j
ava:56)","software.amazon.awssdk.http.apache.internal.impl.ApacheSdkHttpClient.execute(ApacheSdkHttpClient.java:72)","software.amazon.awssdk.http.apache.ApacheHttpClient.execute(ApacheHttpClient.java:200)","sof
tware.amazon.awssdk.http.apache.ApacheHttpClient.access$400(ApacheHttpClient.java:92)","software.amazon.awssdk.http.apache.ApacheHttpClient$1.call(ApacheHttpClient.java:178)","software.amazon.awssdk.http.apache
.ApacheHttpClient$1.call(ApacheHttpClient.java:175)","software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.executeHttpRequest(MakeHttpRequestStage.java:58)","software.amazon.awssdk.cor
e.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:50)","software.amazon.awssdk.core.internal.http.pipeline.stages.MakeHttpRequestStage.execute(MakeHttpRequestStage.java:34)"
,"software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.amazon.awssdk.core.internal.http.pipeline.RequestPip
elineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipel
ineBuilder.java:205)","software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.amazon.awssdk.core.internal.htt
p.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.doExecute(Retrya
bleStage.java:145)","software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage$RetryExecutor.execute(RetryableStage.java:111)","software.amazon.awssdk.core.internal.http.pipeline.stages.Retryable
Stage.execute(RetryableStage.java:69)","software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:49)","software.amazon.awssdk.core.internal.http.pipeline.RequestPipel
ineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:57)","software.amazon.awssdk.co
re.internal.http.StreamManagingStage.execute(StreamManagingStage.java:42)","software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder
.java:205)","software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:205)","software.amazon.awssdk.core.internal.http.pipeline
.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)","software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execu
te(ExecutionFailureExceptionReportingStage.java:25)","software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:283)","software.amazon.awssdk.c
ore.client.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:91)","software.amazon.awssdk.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:103)","software.amazon.awssdk
.core.client.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:68)","software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:44)","software.amazon.awssdk
.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:53)","software.amazon.awssdk.services.dynamodb.DefaultDynamoDbClient.scan(DefaultDynamoDbClient.java:2456)","com.amazonaws.dao.Orde
rDao.getOrders(OrderDao.java:152)","com.amazonaws.handler.GetOrdersHandler.handleRequest(GetOrdersHandler.java:64)","sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)","sun.reflect.NativeMethodAccesso
rImpl.invoke(NativeMethodAccessorImpl.java:62)","sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)","java.lang.reflect.Method.invoke(Method.java:498)"]}}
2019-06-07 06:07:41 127.0.0.1 - - [07/Jun/2019 06:07:41] "GET /orders HTTP/1.1" 502 -
2019-06-07 06:07:42 127.0.0.1 - - [07/Jun/2019 06:07:42] "GET /favicon.ico HTTP/1.1" 403 -

PS:

I tried running other containers in docker and exposing ports which work perfectly example
`docker run -d -p 80:80 nginx
`
So I don't think it something in docker that's missing here

I am facing the same issue, Did you get any solution to this ?

I am facing the same issue, Did you get any solution to this ?

It looks to me like there are 2 docker containers and the one is trying to connect to the DynamoDB local container. When that happens, docker networking needs to be set up and both containers on the same docker network. If you use compose, it solves this easier, but I am just guessing as to what the problem is based on what I am reading.

authors: Snedden prakharvk synchrophoto

repo: aws-samples/aws-sam-java-rest


text:
fix: add SqsManagedSseEnabled to SQS resources explicitly

Internal code scanning requirement. Example:
PropertiesEventBusRuleDLQ:
    Type: AWS::SQS::Queue
    UpdateReplacePolicy: Delete
    DeletionPolicy: Delete
    Properties:
      SqsManagedSseEnabled: true
      MessageRetentionPeriod: 1209600 # Maximum value, 1,209,600 (14days)
      Tags:
        - Key: project
          Value: AWS Serverless Developer Experience
        - Key: service
          Value: !Sub "{{resolve:ssm:/UniProp/${Stage}/UnicornPropertiesNamespace}}"
        - Key: stage
          Value: !Ref Stage

Resolved


text:
added script to retrive role name for work nodes.

Issue #, if available:
Description of changes:
Added scripts to retrieve role name from worker nodes,  and also updated following sed scripts to pick up changes from environment variables.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The role name is already exported in the environment as $ROLE from here:
https://eksworkshop.com/eksctl/test/
Is this not sufficient?

In my case I use zsh instead of bash, so those environment variables didn’t
work. It would be nice to have those, make sure to install Kubeflow
successfully.
On Sat, Nov 16, 2019 at 12:57 AM Brent Langston notifications@github.com
wrote:

The role name is already exported in the environment as $ROLE from here:
https://eksworkshop.com/eksctl/test/
Is this not sufficient?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/aws-samples/eks-workshop/pull/513?email_source=notifications&email_token=ALBXWMRCBYKZOYYW6JOC5KDQT3IGBA5CNFSM4JN5OYI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEGBUDQ#issuecomment-554441230,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALBXWMQWMWL7FT6MRY3YTZTQT3IGBANCNFSM4JN5OYIQ
.

@cc4i  ROLE_NAME already exists in bash_profile. See here: https://eksworkshop.com/eksctl/test/. Workshop makes use of Cloud9. I’d try the workshop starting with prereqs preferably using Event Engine. I'm going to close this PR as its not necessary

authors: brentley cc4i dalbhanj

repo: aws-samples/eks-workshop


text:
Feature: Add parameter to choose between read-write events or only write events in CloudTrail Event Data Store

We have 250+ accounts. After deploying the initial solution we had a cost of 100$+/day for our CloudTrail Event Data store. We are only interested in "Write" actions in our accounts and this decreased our CloudTrail cost a lot.
Add the possibility for others to choose if they want to capture all events or only write events (cost perspective).
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks for taking the leading on this @lvthillo. With this change, users can be selective about the amount of logging they enable as part of their TEAM deployment. The options for this are:

read_write - record read and write events
read - record only read events
write - record only write events
none - disable event logging

Depending on an organisation's regulatory and governance requirements, this can help to significantly reduce the cost of deploying the TEAM solution.

authors: lvthillo tawoyinfa

repo: aws-samples/iam-identity-center-team


text:
Initiate retrieval workflow

Issue #:
https://app.asana.com/0/1202938635037719/1204196022036762/f
Description of changes:
Write Job ID and Archive ID to the DynamoDB table.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Created in error.


text:
Update CBMC starter kit

Issue #, if available:
Description of changes:
This PR:

changes the SPDX identifier in CBMC proof Makefile from Apache-2.0 to MIT-0
introduces updates to the files related to the CBMC starter kit (this was accomplished by running cbmc-starter-kit-update).
removes 2 .git submodules (this was accomplished by running cbmc-starter-kit-update --remove-starter-kit-submodule --remove-litani-submodule). symlinks to files present in the CBMC starter-kit submodule are no longer present Additionally, a user will have to install litani (instructions here) in order to run CBMC proofs locally. litani is present in the CI system that executes the CBMC proofs.
updates the README to include a section on CBMC.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The latest force-push concerned solely the SPDX identifier change.


text:
wait for current credentials before signOut

Fixes https://github.com/aws/aws-amplify/issues/245

Codecov Report

Merging #247 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #247      +/-   ##
==========================================
+ Coverage   90.77%   90.77%   +<.01%
==========================================
  Files          53       53
  Lines        2515     2516       +1
  Branches      510      510
==========================================
+ Hits         2283     2284       +1
  Misses        221      221
  Partials       11       11

Impacted Files
Coverage Δ

packages/aws-amplify/src/Auth/Auth.ts
89.47% <100%> (+0.02%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4bed60...48bce0f. Read the comment docs.

authors: codecov-io richardzcode

repo: aws/aws-amplify


text:
Align configurations for both deployment options

Need to keep same replica numbers and configurations for both manifest and helm chart.
Need to make env options configurable on manifest installation as well. This can be done through config map which will align with helm chart better.

fixed in #549

authors: mikhail-aws solmonk


text:
Add DynamoDB and Kinesis Time Window events and response models

Issue #, if available:
https://github.com/aws/aws-lambda-go/issues/358
Description of changes:
Add support for Time Window events.
Based on Java implementation: https://github.com/aws/aws-lambda-java-libs/pull/202
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #441 (932fc28) into main (a0b8eda) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage   72.18%   72.18%
=======================================
  Files          19       19
  Lines        1039     1039
=======================================
  Hits          750      750
  Misses        221      221
  Partials       68       68

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a0b8eda...932fc28. Read the comment docs.

authors: carlzogh codecov-commenter

repo: aws/aws-lambda-go


text:
Low entropy after enclave boot (reading from /dev/random blocks)

Hi,
I just faced the problem, a brand new enclave has zero entropy:
cat /proc/sys/kernel/random/entropy_avail
0

which causing block when reading from /dev/random early after boot.
What about adding some entropy from NSM RNG at enclave boot stage ?
(in nitro-cli run-enclave? )
(or at lower level:  I just submitted issue there - https://github.com/aws/aws-nitro-enclaves-sdk-bootstrap/issues/5)
Another question: which preferred workaround to use right now?

There a few possible solutions:

Call aws_nitro_enclaves_library_seed_entropy explicitly during application start, and on a timer afterwards.
Use RDSEED CPU instruction to seed entropy, rngd or similar can help with this.
Set random.trust_cpu=on in the kernel commandline (only works on Linux kernels > 4.19).

It might be possible to integrate calls to generate entropy and seed entropy into the provided init process of the enclave, but might not be the best option.

Hi @petreeftime , is there an easy way to call aws_nitro_enclaves_library_seed_entropy from the command line?

I attempted to use solution 1 to supply the system with entropy but it doesn't have the expected effect. Here's what I did:

Run a simple executable that calls aws_nitro_enclaves_library_seed_entropy(1024) periodically.
Look at /proc/sys/kernel/random/entropy_avail, which is still 0.
Start a separate application that reads from /dev/urandom; the read call blocks.

What am I missing here? For what it's worth, I'm running my enclave in debug mode (in case that makes a difference) and here are the last four log messages from startup:
[    1.024374] nsm: loading out-of-tree module taints kernel.
[    1.025030] nsm: module verification failed: signature and/or required key missing - tainting kernel
[    1.033770] random: entropy-init: uninitialized urandom read (32 bytes read)
[    1.034594] random: entropy-init: uninitialized urandom read (32 bytes read)

authors: Jonas-Metzger NullHypothesis petreeftime ppmag

repo: aws/aws-nitro-enclaves-sdk-c


text:
Improve validation messages

We were showing the param.value in the error message, but it is different from the configuration value.
E.g. param.value is a Boolean (True|False), but the configuration value is true|false
Previous behaviour:
$ pcluster create testcluster -t testcluster
Beginning cluster creation for cluster: testcluster
ERROR: The configuration parameter 'disable_hyperthreading' has an invalid value 'True'
cfn_scheduler_slots cannot be set in addition to disable_hyperthreading = true

Current behaviour:
$ pcluster create testcluster -t testcluster
Beginning cluster creation for cluster: testcluster
ERROR: The configuration parameter 'disable_hyperthreading' generated the following errors:
cfn_scheduler_slots cannot be set in addition to disable_hyperthreading = true

See: https://github.com/aws/aws-parallelcluster/issues/1540

Thanks, looks much better.

authors: PhilipMorrisJones enrico-usai

repo: aws/aws-parallelcluster


text:
Propagate cluster s3 bucket information to the compute nodes

This is required to fetch config from S3 if for some reason the config file is no longer available in the shared storage.
As part of cookbook refactoring I wrongly moved the fetch_config.rb before the mount of the shared storage. Since the config was not available from the shared storage, the compute node was trying to download it from s3 but the cluster/cluster_s3_bucket node attribute was unavailable.
I'm going to restore the order to avoid fetching from s3 every time but in any case it's useful to add robustness to the compute nodes fetch_config logic.

This patch is incomplete, s3 key is missing.


text:
Silently connecting to metadata service in constructor is dangerous behavior

I noticed in 147469373c9fec1037bd2d75d7cd949250c6f7c5, it introduced a behavior where, if the region was not specified, it tried to infer it from the EC2 metadata service.  I think this is dangerous behavior because

A user not using S3 probably doesn't care about this field.  A user who additionally isn't using EC2 will incur a several second wait (as this person did https://stackoverflow.com/questions/63725308/awss3s3client-constructor-very-slow).
More importantly, if you are using EC2 but not US-EAST-1 and relying on this, and for some reason one day it fails to connect to the metadata service during the constructor, you have accidentally created a cross-region S3Client without knowing about it.  Since cross region traffic is billed by the byte, this could be a very expensive mistake!

Its easy to work around this by just setting the region explicitly, but it isn't clear that this is a requirement from anything I've seen.
Thanks!

Hi @jvictor0 ,
Yea this is a good point, but it's kind of "known" thing/topic(?)
This was a conscious decision, and that is not to say your points are not valid... but yea let me kind of justify why that's there.
So the first thing to note is that this is meant to only be "default" behavior, the option is there in case you want to avoid it, I wouldn't even say it's a workaround, it is expected that you are able to customize this in whatever way you prefer, so you can explicitly tell the SDK where to look, or have a custom chain of places to look for that don't include the EC2 metadata... But yea it's not a requirement, it's an option.
The idea was to have the sdk run with as little configuration necessary, so we made the default credentials provider chain check for region in all the expected places.
Dunno if this makes sense but let me know what you think.

repo: aws/aws-sdk-cpp