You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python: Add S3 Batch scenario with CloudFormation integration (#7572)
* Python: Add S3 Batch scenario
* chore(README): Add README for S3 Batch Python
* test: Add unit tests for S3 Batch Scenario Python
* Fix job activation and update tests
* chore(metadata): Add new metadata to s3-control-metadata
* Add job status, priority updates, tagging
* feat: add type hints and fix status message
* chore(metadata): add snippet tags and metadata for every operations
* refactor: standardize user input handling with helper and update metadata.yaml
* refactor: restructure classes to follow Python examples standards
* refactor: remove hard-coded region and use default config
* refactor: use client injection pattern to follow Python examples standards
* test: add service method stubbing pattern to follow Python Examples Standards
* chore: fix snippet tags
* chore: address metadata and README items
* add clean up resources for when scenario fails
* Update with status checking for cancellation, and simplified integration test.
---------
Co-authored-by: Rachel Hagerman <[email protected]>
This example demonstrates how to use the AWS SDK for Python (boto3) to work with Amazon Simple Storage Service (Amazon S3) Batch Scenario. The scenario covers various operations such as creating an AWS Batch compute environment, creating a job queue, creating a job defination, and submitting a job, and so on.
6
+
7
+
Here are the top six service operations this scenario covers.
8
+
9
+
1.**Create an AWS Batch computer environment**: Creates an AWS Batch computer environment.
10
+
11
+
2.**Sets up a job queue**: Creates a job queue that will manage the submission of jobs.
12
+
13
+
3.**Creates a job definition**: Creates a job definition that specifies how the jobs should be executed.
14
+
15
+
4.**Registers a Job Definition**: Registers a job definition making it available for job submissions.
16
+
17
+
5.**Submits a Batch Job**: Submits a job.
18
+
19
+
6.**Checks the status of the job**: Checks the status of the job.
20
+
21
+
## ⚠ Important
22
+
23
+
- Running this code might result in charges to your AWS account. For more details, see [AWS Pricing](https://aws.amazon.com/pricing/) and [Free Tier](https://aws.amazon.com/free/).
24
+
- Running the tests might result in charges to your AWS account.
25
+
- We recommend that you grant your code least privilege. At most, grant only the minimum permissions required to perform the task. For more information, see [Grant least privilege](https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege).
26
+
- This code is not tested in every AWS Region. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).
27
+
28
+
## Code examples
29
+
30
+
### Prerequisites
31
+
32
+
To run these examples, you need:
33
+
34
+
- Python 3.x installed.
35
+
- Run `python pip install -r requirements.txt`
36
+
- AWS credentials configured. For more information, see [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).
37
+
38
+
#### Running the workflow
39
+
40
+
To run this workflow, pull AWS tokens and run the command below:
0 commit comments