示例代码:
import boto3
client = boto3.client('config')
response = client.get_resource_config_history( resourceType='AWS::EC2::Instance', resourceId='i-0123456789abcdef', limit=10 )
print(response['configurationItems'])
示例代码:
import boto3
client = boto3.client('cloudformation')
response = client.create_stack( StackName='my-stack', TemplateURL='https://s3.amazonaws.com/mybucket/mytemplate.yml' )
print(response)
示例代码(使用Terraform):
provider "aws" { region = "us-west-2" }
resource "aws_instance" "example" { ami = "ami-0c55b159cbfafe1f0" instance_type = "t2.micro" }