AWS DevOps Robot Programming & Configuration 4 — Questions and Answers
Question 1: In AWS Systems Manager Automation, what document type is used to define multi-step runbooks for automating operational tasks?
- Automation (Correct answer)
- Command
- Session
- Policy
Correct answer: Automation
SSM Automation documents define orchestrated runbooks with steps like 'aws:runInstances' or 'aws:executeScript' for automated operational workflows.
Question 2: Which Robot Framework library is MOST commonly used for testing REST APIs in an AWS DevOps pipeline?
- RequestsLibrary (Correct answer)
- HttpLibrary
- RESTLibrary
- AWSAPILibrary
Correct answer: RequestsLibrary
RequestsLibrary wraps the Python 'requests' library, providing keywords like 'GET On Session' and 'POST On Session' for REST API testing.
Question 3: When configuring a buildspec.yml for Robot Framework in CodeBuild, where should you place the `pip install robotframework` command?
- install phase (Correct answer)
- pre_build phase
- build phase
- post_build phase
Correct answer: install phase
The install phase in buildspec.yml is designed for installing runtime dependencies like Python packages before tests or builds run.
Question 4: A Robot Framework test uses `${API_KEY}` loaded from an environment variable. What AWS service is the BEST source for this secret in a CodeBuild project?
- AWS Secrets Manager via environment variable injection (Correct answer)
- Hardcoded in the buildspec.yml file
- Stored in a public S3 bucket
- Embedded in the Robot Framework .robot file
Correct answer: AWS Secrets Manager via environment variable injection
CodeBuild natively integrates with AWS Secrets Manager, allowing secrets to be injected as environment variables at build time without exposure in code.
Question 5: In Robot Framework, what is the correct syntax to define a keyword that accepts two positional arguments?
- My Keyword\n [Arguments] ${arg1} ${arg2} (Correct answer)
- def my_keyword(arg1, arg2):
- keyword My Keyword(arg1, arg2)
- KEYWORD My Keyword ARGS arg1 arg2
Correct answer: My Keyword\n [Arguments] ${arg1} ${arg2}
Robot Framework keyword definitions use the `[Arguments]` setting with `${variable}` syntax to declare positional parameters.
Question 6: Which tag in Robot Framework allows you to skip specific test cases when running in a particular environment, such as skipping destructive tests in production?
- robot --exclude <tag> (Correct answer)
- robot --skip <tag>
- robot --ignore <tag>
- robot --filter <tag>
Correct answer: robot --exclude <tag>
The `--exclude` flag tells Robot Framework to skip all tests tagged with the specified tag, enabling environment-specific test selection.
Question 7: An AWS DevOps engineer needs Robot Framework test failures to automatically create a Jira ticket. Which AWS service is BEST suited for this post-test webhook integration?
- Amazon EventBridge with a CodeBuild state change rule (Correct answer)
- Amazon Route 53 health checks
- AWS WAF rule groups
- Amazon CloudFront functions
Correct answer: Amazon EventBridge with a CodeBuild state change rule
EventBridge can capture CodeBuild BUILD_FAILED events and trigger a Lambda function or API destination to create a Jira ticket automatically.
In AWS Systems Manager Automation, what document type is used to define multi-step runbooks for automating operational tasks?