mirror of
https://github.com/nickpoida/og-aws.git
synced 2025-02-14 19:02:00 +00:00
Adding small tips in the Boto3 section
Hi, I've added a small tips about the types of the APIs and a little insight about the features. Regards
This commit is contained in:
parent
9e803f5369
commit
11e0440633
1 changed files with 6 additions and 0 deletions
|
@ -505,6 +505,12 @@ So if you’re not going to manage your AWS configurations manually, what should
|
|||
### Boto
|
||||
|
||||
- A good way to automate operations in a custom way is [**Boto3**](https://github.com/boto/boto3), also known as the [Amazon SDK for Python](http://aws.amazon.com/sdk-for-python/). [**Boto2**](https://github.com/boto/boto), the previous version of this library, has been in wide use for years, but now there is a newer version with official support from Amazon, so prefer Boto3 for new projects.
|
||||
- Boto3 contains a variety of APIs that operate at either a high level or a low level, here some explanation of both:
|
||||
- The low level APIs (Client APIs) are mapped to AWS Cloud service-specific APIs, and all service operations are supported by clients. Clients are generated from a JSON service definition file.
|
||||
- The high level option, Resource APIs, allows you to avoid calling the network at the low level and instead provide an object-oriented way to interact with AWS Cloud services.
|
||||
|
||||
|
||||
Also, Boto3 has a lot of helpful [**features**](https://boto3.readthedocs.io/en/latest/guide/index.html#general-feature-guides) like *waiters*, which provide a structure that allows for code to wait for changes to occur in the cloud, for example, when you are creating an EC2 instance and need wait until the instance is running in order to perform another task.
|
||||
- If you find yourself writing a Bash script with more than one or two CLI commands, you’re probably doing it wrong. Stop, and consider writing a Boto script instead. This has the advantages that you can:
|
||||
- Check return codes easily so success of each step depends on success of past steps.
|
||||
- Grab interesting bits of data from responses, like instance ids or DNS names.
|
||||
|
|
Loading…
Reference in a new issue