Welcome to botocore#
Botocore is a low-level interface to a growing number of Amazon Web Services. Botocore serves as the foundation for the AWS-CLI command line utilities. It will also play an important role in the boto3.x project.
The botocore package is compatible with Python versions Python 3.8 and higher.
Contents:
- Getting Started With botocore
- AWS Request Reference
- Config Reference
- Event Stream Reference
- Available Services
- AccessAnalyzer
- Account
- ACM
- ACMPCA
- PrometheusService
- Amplify
- AmplifyBackend
- AmplifyUIBuilder
- APIGateway
- ApiGatewayManagementApi
- ApiGatewayV2
- AppConfig
- AppConfigData
- AppFabric
- Appflow
- AppIntegrationsService
- ApplicationAutoScaling
- ApplicationInsights
- CloudWatchApplicationSignals
- ApplicationCostProfiler
- AppMesh
- AppRunner
- AppStream
- AppSync
- MainframeModernizationApplicationTesting
- ARCZonalShift
- Artifact
- Athena
- AuditManager
- AutoScaling
- AutoScalingPlans
- B2BI
- Backup
- BackupGateway
- Batch
- BillingandCostManagementDataExports
- BillingandCostManagementPricingCalculator
- Bedrock
- AgentsforBedrock
- AgentsforBedrockRuntime
- DataAutomationforBedrock
- RuntimeforBedrockDataAutomation
- BedrockRuntime
- Billing
- BillingConductor
- Braket
- Budgets
- CostExplorer
- Chatbot
- Chime
- ChimeSDKIdentity
- ChimeSDKMediaPipelines
- ChimeSDKMeetings
- ChimeSDKMessaging
- ChimeSDKVoice
- CleanRoomsService
- CleanRoomsML
- Cloud9
- CloudControlApi
- CloudDirectory
- CloudFormation
- CloudFront
- CloudFrontKeyValueStore
- CloudHSM
- CloudHSMV2
- CloudSearch
- CloudSearchDomain
- CloudTrail
- CloudTrailDataService
- CloudWatch
- CodeArtifact
- CodeBuild
- CodeCatalyst
- CodeCommit
- CodeConnections
- CodeDeploy
- CodeGuruReviewer
- CodeGuruSecurity
- CodeGuruProfiler
- CodePipeline
- CodeStarconnections
- CodeStarNotifications
- CognitoIdentity
- CognitoIdentityProvider
- CognitoSync
- Comprehend
- ComprehendMedical
- ComputeOptimizer
- ConfigService
- Connect
- ConnectContactLens
- ConnectCampaignService
- ConnectCampaignServiceV2
- ConnectCases
- ConnectParticipant
- ControlCatalog
- ControlTower
- CostOptimizationHub
- CostandUsageReportService
- CustomerProfiles
- GlueDataBrew
- DataExchange
- DataPipeline
- DataSync
- DataZone
- DAX
- DeadlineCloud
- Detective
- DeviceFarm
- DevOpsGuru
- DirectConnect
- ApplicationDiscoveryService
- DLM
- DatabaseMigrationService
- DocDB
- DocDBElastic
- drs
- DirectoryService
- DirectoryServiceData
- AuroraDSQL
- DynamoDB
- DynamoDBStreams
- EBS
- EC2
- EC2InstanceConnect
- ECR
- ECRPublic
- ECS
- EFS
- EKS
- EKSAuth
- ElasticInference
- ElastiCache
- ElasticBeanstalk
- ElasticTranscoder
- ElasticLoadBalancing
- ElasticLoadBalancingv2
- EMR
- EMRContainers
- EMRServerless
- EntityResolution
- ElasticsearchService
- EventBridge
- CloudWatchEvidently
- finspace
- FinSpaceData
- Firehose
- FIS
- FMS
- ForecastService
- ForecastQueryService
- FraudDetector
- FreeTier
- FSx
- GameLift
- LocationServiceMapsV2
- LocationServicePlacesV2
- LocationServiceRoutesV2
- Glacier
- GlobalAccelerator
- Glue
- ManagedGrafana
- Greengrass
- GreengrassV2
- GroundStation
- GuardDuty
- Health
- HealthLake
- IAM
- IdentityStore
- imagebuilder
- ImportExport
- Inspector
- inspectorscan
- Inspector2
- CloudWatchInternetMonitor
- Invoicing
- IoT
- IoTDataPlane
- IoTJobsDataPlane
- IoT1ClickDevicesService
- IoT1ClickProjects
- IoTAnalytics
- IoTDeviceAdvisor
- IoTEvents
- IoTEventsData
- IoTFleetHub
- IoTFleetWise
- IoTSecureTunneling
- IoTSiteWise
- IoTThingsGraph
- IoTTwinMaker
- IoTWireless
- IVS
- ivsrealtime
- ivschat
- Kafka
- KafkaConnect
- kendra
- KendraRanking
- Keyspaces
- Kinesis
- KinesisVideoArchivedMedia
- KinesisVideoMedia
- KinesisVideoSignalingChannels
- KinesisVideoWebRTCStorage
- KinesisAnalytics
- KinesisAnalyticsV2
- KinesisVideo
- KMS
- LakeFormation
- Lambda
- LaunchWizard
- LexModelBuildingService
- LexRuntimeService
- LexModelsV2
- LexRuntimeV2
- LicenseManager
- LicenseManagerLinuxSubscriptions
- LicenseManagerUserSubscriptions
- Lightsail
- LocationService
- CloudWatchLogs
- LookoutEquipment
- LookoutMetrics
- LookoutforVision
- MainframeModernization
- MachineLearning
- Macie2
- MailManager
- ManagedBlockchain
- ManagedBlockchainQuery
- AgreementService
- MarketplaceCatalog
- MarketplaceDeploymentService
- MarketplaceEntitlementService
- MarketplaceReportingService
- MarketplaceCommerceAnalytics
- MediaConnect
- MediaConvert
- MediaLive
- MediaPackage
- MediaPackageVod
- mediapackagev2
- MediaStore
- MediaStoreData
- MediaTailor
- HealthImaging
- MemoryDB
- MarketplaceMetering
- MigrationHub
- mgn
- MigrationHubRefactorSpaces
- MigrationHubConfig
- MigrationHubOrchestrator
- MigrationHubStrategyRecommendations
- MQ
- MTurk
- MWAA
- Neptune
- NeptuneGraph
- NeptuneData
- NetworkFirewall
- NetworkFlowMonitor
- NetworkManager
- CloudWatchNetworkMonitor
- UserNotifications
- UserNotificationsContacts
- CloudWatchObservabilityAccessManager
- CloudWatchObservabilityAdminService
- Omics
- OpenSearchService
- OpenSearchServiceServerless
- OpsWorks
- OpsWorksCM
- Organizations
- OpenSearchIngestion
- Outposts
- Panorama
- PartnerCentralSellingAPI
- PaymentCryptographyControlPlane
- PaymentCryptographyDataPlane
- PcaConnectorAd
- PrivateCAConnectorforSCEP
- ParallelComputingService
- Personalize
- PersonalizeEvents
- PersonalizeRuntime
- PI
- Pinpoint
- PinpointEmail
- PinpointSMSVoice
- PinpointSMSVoiceV2
- EventBridgePipes
- Polly
- Pricing
- Private5G
- Proton
- QApps
- QBusiness
- QConnect
- QLDB
- QLDBSession
- QuickSight
- RAM
- RecycleBin
- RDS
- RDSDataService
- Redshift
- RedshiftDataAPIService
- RedshiftServerless
- Rekognition
- rePostPrivate
- ResilienceHub
- ResourceExplorer
- ResourceGroups
- ResourceGroupsTaggingAPI
- RoboMaker
- IAMRolesAnywhere
- Route53
- Route53RecoveryCluster
- Route53RecoveryControlConfig
- Route53RecoveryReadiness
- Route53Domains
- Route53Profiles
- Route53Resolver
- CloudWatchRUM
- S3
- S3Control
- S3Outposts
- S3Tables
- SageMaker
- AugmentedAIRuntime
- SagemakerEdgeManager
- SageMakerFeatureStoreRuntime
- SageMakergeospatialcapabilities
- SageMakerMetrics
- SageMakerRuntime
- SavingsPlans
- EventBridgeScheduler
- Schemas
- SimpleDB
- SecretsManager
- SecurityIncidentResponse
- SecurityHub
- SecurityLake
- ServerlessApplicationRepository
- ServiceQuotas
- ServiceCatalog
- AppRegistry
- ServiceDiscovery
- SES
- SESV2
- Shield
- signer
- SimSpaceWeaver
- SMS
- SnowDeviceManagement
- Snowball
- SNS
- EndUserMessagingSocial
- SQS
- SSM
- SSMContacts
- SSMIncidents
- SystemsManagerQuickSetup
- SsmSap
- SSO
- SSOAdmin
- SSOOIDC
- SFN
- StorageGateway
- STS
- SupplyChain
- Support
- SupportApp
- SWF
- Synthetics
- TaxSettings
- Textract
- TimestreamInfluxDB
- TimestreamQuery
- TimestreamWrite
- TelcoNetworkBuilder
- TranscribeService
- Transfer
- Translate
- TrustedAdvisorPublicAPI
- VerifiedPermissions
- VoiceID
- VPCLattice
- WAF
- WAFRegional
- WAFV2
- WellArchitected
- ConnectWisdomService
- WorkDocs
- WorkMail
- WorkMailMessageFlow
- WorkSpaces
- WorkSpacesThinClient
- WorkSpacesWeb
- XRay
- Loaders Reference
- Response Reference
- Stubber Reference
- Botocore Topic Guides
- Botocore Development
Upgrade Notes#
Upgrading to 1.12.0#
What Changed#
The botocore event system was changed to emit events based on the service id rather than the endpoint prefix or service name.
Why Was The Change Was Made#
This was done to handle several issues that were becoming increasingly problematic:
Services changing their endpoint prefix would cause some registered events to no longer fire (but not all).
New services that launch using an endpoint that another service is using won’t be able to be uniquely selected. There are a number of cases of this already.
Services whose client name and endpoint prefix differed would require two different strings if you want to register against all events.
How Do I Know If I’m Impacted#
Any users relying on registering an event against one service impacting other services are impacted. You can consult the following table to see if you are impacted. If you are registering an event using one of the event parts in the leftmost column with the intention of impacting an unintended target service in the rightmost column, then you are impacted and will need to update.
Event Part |
Intended Target Service |
Unintended Target Services |
rds |
rds |
neptune |
autoscaling |
autoscaling |
application-autoscaling, autoscaling-plans |
kinesisvideo |
kinesisvideo |
kinesis-video-media, kinesis-video-archived-media |
elasticloadbalancing |
elb |
elbv2 |
For example, if you are registering an event against
before-call.elasticloadbalancing
expecting it to run when making calls with
an elbv2
client, you will be impacted.
If you are registering an event against one of the services in the Unintended Targets column, you may be impacted if you were relying on those events not firing.
If you are registering events using *
in the service place, or are
registering against any service not in this table, you will not need a code
change. In many cases the actual event name will have changed, but for services
without shared endpoints we do the work of translating the event name at
registration and emission time. In future versions of botocore we will remove
this translation, so you may wish to update your code anyway.
How Do I Update My Code#
You will need to look at the events you are registering against and determine which services you wish to impact with your handler. If you only wish to impact the intended target service (as defined in the above table), then you don’t need to change the event. If you wish to impact another service in addition to the intended target service, you will need to register a new event using that service’s event name. Similarly, if you wish to impact another service instead you will simply need to change the event you are registered against.
To get the new event name, consult this table:
Service |
Old Event Name |
New Event Name |
application-autoscaling |
autoscaling |
application-auto-scaling |
autoscaling-plans |
autoscaling |
auto-scaling-plans |
elbv2 |
elasticloadbalancing |
elastic-load-balancing |
kinesis-video-archived-media |
kinesisvideo |
kinesis-video-archived-media |
kinesis-video-media |
kinesisvideo |
kinesis-video-media |
neptune |
rds |
neptune |
Additionally, you can get the new event name in code like so:
from botocore.session import Session
session = Session()
client = session.create_client('elbv2')
service_event_name = client.meta.service_model.service_id.hyphenize()
Armed with the service event name, simply replace the old service name in the
handler with the new service event name. If you were registering an event
against before-call.autoscaling
intending to impact autoscaling-plans
for example, you would instead register against
before-call.auto-scaling-plans
.
If you are registering an event against one of the services in the Unintended Targets column, you will now see those events getting fired where previously they were not. While this is enabling that expected behavior, this still represents a change in actual behavior. You should not need to update your code, but you should test to ensure that you are seeing the behavior you want.
Upgrading to 1.11.0#
The vendored versions of
requests
andurllib3
are no longer being used and have been replaced with a direct dependency on upstreamurllib3
andrequests
is no longer a dependency ofbotocore
. While these vendored dependencies are still in thebotocore
package they should not be used as they will be removed in the future. Any code that imports frombotocore.vendored.requests.*
should be updated accordingly. Specifically, the use ofbotocore.vendored.requests.exceptions.*
orbotocore.vendored.requests.packages.urllib3.exceptions.*
must be updated to the corresponding exception classes inbotocore.exceptions
.The version of
urllib3
used to make HTTP requests has been updated from v1.10.4 to the range >=1.20,<1.24.
Upgrading to 1.0.0rc1#
The
default
argument tosession.get_config_variable()
has been removed. If you need this functionality you can use:value = session.get_config_variable() or 'default value'
Upgrading to 0.104.0#
Warnings about imminent removal of service/operation objects are now printed to stderr by default. It is highly encouraged that you switch to clients as soon as possible, as the deprecated service/operation object is going away. See Upgrading to Clients for more information.
Upgrading to 0.66.0#
The
before-call
andafter-call
events have been changed such that theirmodel
for the operation is sent instead of theoperation
object itself.The interface to waiters via
Service.get_waiter
has changed. An endpoint is now required when creating the waiter viaget_waiter()
instead of when calling the waiterwaiter.wait(endpoint, **kwargs)
.
Upgrading to 0.65.0#
get_scoped_config()
will now include credentials from the shared credentials file (~/.aws/credentials
) if present.
Upgrading to 0.64.0#
botocore.parameters
has been split into several different modules (validate
,serialize
, andmodel
). If you were using theOperation.call
method, you are unaffected by this change.A
botocore.client
module has been added. This is the preferred interface into botocore going forward.Response keys that are no longer in the HTTP response are not mapped to default values in the response dict.
ResponseMetadata
is now always added to any successful responseErrors
has been switch from a list of errors to a singleError
key. Also consistently populate theError
dict on errors.