ec2.RunInstances python "BlockDeviceMapping" typo
jbananas opened this issue · comments
Describe the bug
Python ec2.RunInstances "BlockDeviceMappings" parameter incorrectly generating as "BlockDeviceMapping".
Related Mapping
ec2.RunInstances
Related Language
Python
To Reproduce
Steps to reproduce the behavior:
- Start recorder
- From EC2 Dashboard click Launch Instance
- Select default amazon linux 2 ami
- Select default t2.micro instance type
- Change default VPC/subnet to anything else.
- Next, Next, Next
- On security group setup page, choose any existing security group.
- Next next finish through wizard
Expected behavior
boto3 ec2 client run_instances() argument is "BlockDeviceMappings" (see https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.run_instances). Recorder is currently outputting "BlockDeviceMapping".
For example:
response = ec2_client.run_instances(
ImageId='ami-009d6802948d06e52',
MaxCount=1,
MinCount=1,
KeyName='mykey',
InstanceType='t2.micro',
Placement={
Tenancy='default'
},
Monitoring={
Enabled=False
},
DisableApiTermination=False,
InstanceInitiatedShutdownBehavior='stop',
CreditSpecification={
CpuCredits='standard'
},
EbsOptimized=False,
BlockDeviceMapping=[
{
DeviceName='/dev/xvda',
Ebs={
VolumeSize=8,
DeleteOnTermination=True,
VolumeType='gp2'
}
}
]
)
Fixed the typo.
Thanks for raising!