You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SSM : Inaccessible host: ssm.'. This service may not be available in the .......' region. #4251
Ok, then as best I can tell the AWS region which you are using just does not currently support SSM. What region are you using? Here are the regions that support SSM:
Hi,
I am using ap-southeast-2 which supports SSM. When I hardcode region in serverless.yml, I do not get the error. I think the error is due to trying to fetch SSM variable before serverless has resolved variable reference.
The AWS_REGION variable is not be populated yet since the SSM Serverless Variable is itself a variable
Ahh, ok, so looking at the code this would be a problem for all variable syntaxes that resolve the variable from AWS services, including CF and S3, not just SSM.
@anantab Does it work if you remove the region line from serverless.yml and pass it on the command line? i.e. serverless package --region ap-southeast-2?
Serverless Error ---------------------------------------
Inaccessible host: `ssm.'. This service may not be available in the `${self:custom.region}' region.
Thanks for taking a deep dive into this @lorengordon 👍
Yes, this is true for all the Serverless Variables in the variables system but it's great that you can pass in the region as a CLI option as a workaround.
Closing this for now since there's a workaround available and adding this enhancement requires a complete Serverless Variables re-write / re-architecturing.
Whereas , if I replace the stage in my CF Arn with a variable, it worked like a charm profile: ${self:custom.private.profile} region: ${self:custom.private.region} stage: ${opt:stage, self:custom.private.stage}
I noticed that I no longer get this error when I forget to include the region parameter while deploying a stack that uses SSM. Was this fixed in a recent release?
Activity
lorengordon commentedon Sep 13, 2017
@anantab Can you share a serverless.yml setup that reproduces the error?
anantab commentedon Sep 14, 2017
Here is what my serverless.yml looks like
The error I am getting is
Inaccessible host:
ssm.'. This service may not be available in the${self:custom.config.AWS_REGION}' region.lorengordon commentedon Sep 14, 2017
Ok, then as best I can tell the AWS region which you are using just does not currently support SSM. What region are you using? Here are the regions that support SSM:
anantab commentedon Sep 14, 2017
Hi,
I am using ap-southeast-2 which supports SSM. When I hardcode region in serverless.yml, I do not get the error. I think the error is due to trying to fetch SSM variable before serverless has resolved variable reference.
pmuens commentedon Sep 14, 2017
Thanks for opening @anantab and thanks for providing help here @lorengordon 👍
@anantab I think you're correct. The
AWS_REGIONvariable is not be populated yet since the SSM Serverless Variable is itself a variable.AFAIK there's no way to do this right now (other than hardcoding the region).
Do you have any creative idea how this could be solved in another way @eahefnawy?
lorengordon commentedon Sep 14, 2017
Ahh, ok, so looking at the code this would be a problem for all variable syntaxes that resolve the variable from AWS services, including CF and S3, not just SSM.
lorengordon commentedon Sep 14, 2017
@anantab Does it work if you remove the
regionline from serverless.yml and pass it on the command line? i.e.serverless package --region ap-southeast-2?lorengordon commentedon Sep 14, 2017
Here's a minimal serverless.yml to reproduce the error and test any patch:
error with
serverless package:lorengordon commentedon Sep 14, 2017
And passing the region on the command line does indeed work.
serverless.yml:
pmuens commentedon Sep 14, 2017
Thanks for taking a deep dive into this @lorengordon 👍
Yes, this is true for all the Serverless Variables in the variables system but it's great that you can pass in the region as a CLI option as a workaround.
Closing this for now since there's a workaround available and adding this enhancement requires a complete Serverless Variables re-write / re-architecturing.
kumaresansv commentedon Nov 2, 2017
I stumbled on something that allowed me to keep "Profile" and "Region" as serverless variables while referring to a CF variable from AWS.
Below code in serverless.yml did not work
profile: ${self:custom.private.profile}region: ${self:custom.private.region}stage: ${opt:stage, self:custom.private.stage}events:- stream:type: dynamodbarn: ${cf:mystack-dev.myStreamArn}Whereas , if I replace the stage in my CF Arn with a variable, it worked like a charm
profile: ${self:custom.private.profile}region: ${self:custom.private.region}stage: ${opt:stage, self:custom.private.stage}events:- stream:type: dynamodbarn: ${cf:mystack-${self:custom.private.stage}.myStreamArn}Try this if it helps.
sonya commentedon Sep 21, 2018
I noticed that I no longer get this error when I forget to include the region parameter while deploying a stack that uses SSM. Was this fixed in a recent release?