Serverless-application-model: VpcConfig Parameter Store Issue

Created on 14 Feb 2019  路  2Comments  路  Source: aws/serverless-application-model

Description:

Hello everyone, I found an issue using SubnetIds in VpcConfig section, I set the parameter as:

Sam parameter:

[...]
  VpcSubnetIds:
   Type: String
[...]

Sam code:

[...]
    VpcConfig:
      SubnetIds: !Split [",", !Ref VpcSubnetIds ]
[...]

I don't have problem If I use the value from .json parameter file (I'm using CodePipeline for deploying)

Json file:

{
    "VpcSubnetIds" : "subnet-002f74fddcde6a9b3,subnet-023566b4a79efe445,subnet-0a1eec1f6665bef5a"
}

But I have problems if I get the value from Parameter Store

Json file:

{
   "VpcSubnetIds" : "{{resolve:ssm:VPC-PrivateSubnetsList:1}}"
}

Parameter Store:
VPC-PrivateSubnetsList | 聽String | subnet-002f74fddcde6a9b3,subnet-023566b4a79efe445,subnet-0a1eec1f6665bef5a

Error occurred while DescribeSubnets. EC2 Error Code: InvalidSubnetID.NotFound. EC2 Error Message: The subnet ID 'subnet-002f74fddcde6a9b3,subnet-023566b4a79efe445,subnet-0a1eec1f6665bef5a' does not exist (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: fbead152-2fbf-11e9-8f01-f76923a568f3)

I've tried using CommaDelimitedList in cloudformation parameter section and to save the parameter as StringList but I have the same issue.

Any opinion?. Thanks

All 2 comments

This does not sound like a SAM issue. Please try StackOverflow for questions like these.

Hii, I am facing same issue. @bleiva did you find any solution?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeroastro picture zeroastro  路  3Comments

axpence picture axpence  路  3Comments

yan12125 picture yan12125  路  3Comments

MaxVynohradov picture MaxVynohradov  路  3Comments

kwcrook picture kwcrook  路  3Comments