我在尝试使用以下代码更新堆栈时收到 ROLLBACK_COMPLETE。在事件下,我没有收到错误,因为“属性 SecurityGroupIds 的值必须是字符串列表类型”。请帮助我找到解决方案。
第一个堆栈的 Mycode:
Resources:
myvpc:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsSupport: true
EnableDnsHostnames: true
InstanceTenancy: default
Tags:
- Key: Name
Value: myvpc
myinternetgateway:
Type: AWS::EC2::InternetGateway
Properties:
Tags:
- Key: Name
Value: mygtwy
mygatewayattach:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
InternetGatewayId: !Ref myinternetgateway
VpcId: !Ref myvpc
mysubnet1:
Type: AWS::EC2::Subnet
Properties:
AvailabilityZone: us-east-1a
VpcId: !Ref myvpc
CidrBlock: 10.0.1.0/24
MapPublicIpOnLaunch: true
Routetable:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref myvpc
Route:
Type: AWS::EC2::Route
DependsOn: myinternetgateway
Properties:
DestinationCidrBlock: 0.0.0.0/0
GatewayId: !Ref myinternetgateway
RouteTableId: !Ref Routetable
SubnetARouteTableAssociation: …Run Code Online (Sandbox Code Playgroud) cloud amazon-ec2 amazon-web-services aws-cloudformation devops
我收到错误为
“ValueError:预期的二维数组,而是得到一维数组:数组=[ 45000. 50000. 60000. 80000. 110000. 150000. 200000. 300000. 500000. 1000000. 1000000. 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000. ) 如果您的数据具有单个特征或 array.reshape(1, -1) 如果它包含单个样本。”
在执行以下代码时:
# SVR
# Importing the libraries
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Importing the dataset
dataset = pd.read_csv('Position_S.csv')
X = dataset.iloc[:, 1:2].values
y = dataset.iloc[:, 2].values
# Feature Scaling
from sklearn.preprocessing import StandardScaler
sc_X = StandardScaler()
sc_y = StandardScaler()
X = sc_X.fit_transform(X)
y = sc_y.fit_transform(y)
# Fitting SVR to the dataset
from sklearn.svm …Run Code Online (Sandbox Code Playgroud)