Open lqueryvg opened 1 year ago
Can we have a solution for this .... ?
It can be solved with plugin https://www.serverless.com/plugins/serverless-offline-ssm
@Drakula2k ...
ssm:
behaviour fixed without introducing another package dependencyaws:
variables ?@lqueryvg yes, you're right, it doesn't completely solve the issue, only the ssm:
case
Any news about that ? It's an important thing to override all aws:
variables in offline config
I'm running into the same problem while upgrading from serverless 2 to 3. Is there any activity concerning this ticket?
Bug Report
It's impossible to work with serverless offline without connect to AWS if your
serverless.yml
file contains any variables which resolve from AWS (e.g.${aws:accountId}
or${ssm:/some/path}
).You get errors like the following:
The only workaround I've seen is to put all such variables in a separate file - and have a separate file for every environment. This is cludgey, nasty, horrible ....
Current Behavior
Sample Code
Expected behavior/code
It should work like this:
AWS_PROFILE
and configure dummy credentials in your .aws directory123412341234
for theaws:accountId
This is how plugins like
serverless-offline-ssm
andserverless-pseudo-parameters
work. But the recommendation seems to be to use the native serverless features instead, despite the fact that they just don't work offline !Environment
Framework Core: 3.23.0 (local) Plugin: 6.2.2 SDK: 4.3.2
Further information
This serverless-offline ticket was closed without action saying that this should be fixed in the core framework: https://github.com/dherault/serverless-offline/issues/1278
This serverless ticket says that this is a problem with serverless-offline: https://github.com/serverless/serverless/issues/11674
Someone needs to grab the bull by the horns on this one because the end user experience is that if you use the
aws:
variables recommended by the documentation, you simply can't use serverless offline without connecting to an AWS service of some kind.