Resolving Secrets from a pinned Region with Serverless Framework at Resolution Mode 20210326 - serverless-framework

Today I saw the deprecation warning for resolving region pinned SSM params & secrets by Serverless:
previous: ssm.<region>:<path>
new: ssm(<region>):<path>
I've updated the variable resolving directly to the latest version via variablesResolutionMode: 20210326, but now this seems to not work anymore for secrets, but only SSM parameters.
Examples:
${ssm(eu-central-1):/some-ssm-param} works fine.
${ssm(eu-central-1):/aws/reference/secretsmanager/some-secret} doesn't.
Error message is not too helpful:
Invalid variable reference syntax for variable ssm(eu-central-1):/aws/reference/secretsmanager/some-secret.
You can only reference env vars, options, & files. You can check our docs for more info.
Documentation does only give examples for retrieving secrets without the pinned region, but this worked before.
Am I missing something here?

Related

Having challenges configuring node:path not resolving in Remix

I'm trying to configure a Remix app to use i18next module for translations.
So far I've been following the guide on Github: https://github.com/sergiodxa/remix-i18next
It seems okay except I can't get node:path to resolve to a module.
I tried a few different things:
Updated nvm to use node 18 instead of 17. Neither works.
I also tried using const path = require('path') which works but then throws a different error trying to load the resource files.
I needed to remove the changeLanguage code in root.tsx to get it to start.
I'd like to isolate it by first trying to fix why the node:path isn't resolving so if someone could help with that, it would be a start?
Debug mode recommends: You can mark the path "node:path" as external to exclude it from the bundle, which will remove this error
But how do I mark it 'external' and what does that mean?

Warning: getOperatorList - ignoring errors during "GetOperatorList: page 0" task: "r: Cannot read properties of undefined (reading 'X')"

In relation to this post:
After upgrading from revit 21 to 22 in my company, we can no longer view anything else than the default 3D model in our forge viewer. Initially, i thought the issue arose due to this warning:
"Deprecated API usage: No "GlobalWorkerOptions.workerSrc" specified.".
However, i got that same message in the console of a working implementation i made today, leading me to believe that it has nothing to do with this warning at all.
However, i also see another warning:
"Warning: getOperatorList - ignoring errors during "GetOperatorList: page 0" task: "r: Cannot read properties of undefined (reading 'X')"."
I have tried creating a new nuxt app on Node version 14.9.0, implemented a forge viewer in accordance with the official v7 documentation, and the bug is no longer present.
I then tried to mimic that in my actual production app where the problem exists, by running it on Node version 14.9.0 instead of 10.0.0, getting rid of my entire forge implementation and implemented a simple viewer like above. That did not solve the problem, and i still see above warnings in the console.
The warning is thrown in pdf.worker.jss, which is loaded in via "webpack://adsk/node_modules/#adsk/pdfjs-dist/legacy/build/pdf.worker.jss".
I hope someone has a suggestion.

Expo application doesn't get changes in .env file

I have an Expo managed react native application. I created my .env file in the root of my project, installed react-native-dotenv and set up babel to use it. After a while I managed to get it to work.
I have my environment variable
ENDPOINT=http://127.0.0.1:8000/api
and i use it with
process.env.ENDPOINT
After a while I decided to test the android version of the app, so i changed the endpoint url to my LAN ip and restarted the server. The problem is that even after restarting the server, the cache and the computer, when I call process.env.ENDPOINT it keeps the first url I set.
Here's a list of the things i tried:
restarting the server
restarting the server and the cache
restarting the whole computer
change the variable name to REACT_APP_ENDPOINT as many suggested (I get undefined, it's still stuck to ENDPOINT)
empty expo cache
The strange thing is that I already changed that same variable twice (from 127.0.0.1:8000 to 127.0.0.1:8080 and back for a problem with backend) and had the same problem, but it went away by itself after a couple of minutes (and server restarts).
This time I've been trying to get it to work for 7 hours and nothing has changed.
Any idea?
I had the same issue and managed to run the app with .env changes after using the following command.
expo r -c
reference: https://github.com/goatandsheep/react-native-dotenv/issues/75#issuecomment-728055969
After a couple hundred more tests I gave up and implemented a "custom" solution, without any external library:
Switched .env files to TypeScript files (E.g. .env.development -> env.development.ts)
Set up an object named env that has all environmental variables as properties
export const env = {
VAR1: 'foo',
...
}
Imported this constant inside the application entry point (in my case App.tsx)
Inside the main constructor assign env to global.env
Use global.env instead of process.env
Not sure if this is the best practice, but solved my problem for now, works like a charm and doesn't require me to reload my application at every change. I'm a bit concerned by the security aspect of having the environment in a global variable inside a js project, so any suggestion is still welcome

Serverless: WARNING: Inappropriate call of provider.request()

I'm using Serverless & the Serverless-Finch plugin to deploy a Serverless website to S3. Serverless Finch config is below.
custom:
client:
bucketName: my-site-${self:provider.stage}
distributionFolder: build
indexDocument: index.html
errorDocument: index.html
When I run serverless client deploy the deployment is successful and my site is online hosted on S3, however the logs in the terminal show this warning repeated about 30 times.
Serverless: WARNING: Inappropriate call of provider.request()
I've tried searching for the cause/meaning of this warning but haven't been able to find any info, any help explaining the error meaning or pointing me to the right bit of documentation is much appreciated.
I've tried changing my YML to not take the stage from the provider object for the bucketName however the warning persisted so I know that is not the source of the issue.
I think this is due to us using the old provider API. We're fixing this in the next release.
https://github.com/fernando-mc/serverless-finch/pull/42
Disclosure - I'm the maintainer for this project.

Icinga2 object ApiUser is unknown

I need help understanding an error why I'm seeing an error.
The feature api is already enabled with the correct ApiListener object, and Api logs are being updated in /var/lib/icinga2/api/log/current .
But I'm getting this error when I restart icinga2:
Error: Error while evaluating expression: The type 'ApiUser' is unknown: in /etc/icinga2/conf.d/api-users.conf: 1:0-1:20
I'm running version r2.3.10-1 of Icinga2 on Ubuntu.
Can someone explain what the problem is?
You are probably mixing the current snapshot packages with the released stable versions. The 'ApiUser' object is part of the upcoming Icinga 2 v2.4 release and only available in git master (and therefore snapshot packages as well as docs). The stable 2.3.x tree does not have that kind of configuration object type and therefore bails out with an error.
Remove that file or its content, you don't need it for 2.3.x.