Failed to create fleet instance: InvalidParameterValue: Parameter 'amiIdList' cannot be empty.
mrhello369 opened this issue · comments
Describe the bug
I use the lib to create ec2 instance, it has the following error:
I0107 21:03:59.283241 698318 main.go:64] Instance: i-0e807bec4669e4866
E0107 21:04:01.495397 698318 ec2.go:73] Failed to create fleet instance: InvalidParameterValue: Parameter 'amiIdList' cannot be empty.
status code: 400, request id: 59c0d958-b3b2-4f49-85f4-6d3d72d6a0e1
panic: InvalidParameterValue: Parameter 'amiIdList' cannot be empty.
status code: 400, request id: 59c0d958-b3b2-4f49-85f4-6d3d72d6a0e1
goroutine 1 [running]:
main.main()
/root/git/ec2-test/main.go:78 +0x50a
exit status 2
And I try to search this field in the lib, but I didn't find it, so I don;t know how to set it.
Expected Behavior
Create ec2 instance successful
Current Behavior
none
Reproduction Steps
1.Unzip the file.
2.Create one asg with on-demand instance.
3.go run main.go
Possible Solution
No response
Additional Information/Context
No response
SDK version used
github.com/aws/aws-sdk-go@v1.49.16
Environment details (Version of Go (go version
)? OS name and version, etc.)
go version go1.20.6 linux/amd64