instance_id stringlengths 15 28 | file_changes listlengths 1 66 | repo stringclasses 11
values | base_commit stringlengths 40 40 | problem_statement stringlengths 23 39.4k | patch stringlengths 252 140k |
|---|---|---|---|---|---|
getmoto__moto-5589 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/s3/models.py:FakeKey.__getstate__"
],
"edited_modules": [
"moto/s3/models.py:FakeKey"
]
},
"file": "moto/s3/models.py"
}
] | getmoto/moto | 8c88a93d7c90edec04dd14919585fd04f0015762 | S3 backend throwing 500 on versioned bucket
This is an injection that happened between 4.0.5 + 4.0.8. The issue is due to line https://github.com/spulec/moto/blob/master/moto/s3/models.py#L1616 which is doing a deep copy of something it should not be deep copying as the structure is complicated with locks and what not... | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -305,7 +305,12 @@ def expiry_date(self):
# https://docs.python.org/3/library/pickle.html#handling-stateful-objects
def __getstate__(self):
state = self.__dict__.copy()
- state["value"] = self.... |
getmoto__moto-5847 | [
{
"changes": {
"added_entities": [
"moto/s3/models.py:S3Backend.log_incoming_request"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"moto/s3/models.py:S3Backend"
]
},
"file": "moto/s3/models.py"
},
{
"changes": {
... | getmoto/moto | fc2e21b8ff37837c38781048b936486c4fe3243f | s3_put_bucket_logging does not actually create and write to logging file.
moto 4.0.8 inside conda using python 3.8.6
I'm trying to measure the number of GET/PUT requests I make to the mock s3 session. AFAICT the way you do this in actual S3 is to enable bucket logging and read the log. moto is not actually creating ... | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -1456,6 +1456,37 @@ def reset(self):
key.dispose()
super().reset()
+ def log_incoming_request(self, request, bucket_name):
+ """
+ Process incoming requests
+ If the requ... |
getmoto__moto-6536 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/cloudformation/models.py:FakeStackInstance.to_dict"
],
"edited_modules": [
"moto/cloudformation/models.py:FakeStackInstance"
]
},
"file": "moto/cloudformation/mode... | getmoto/moto | cb2a40dd0ac1916b6dae0e8b2690e36ce36c4275 | Cloudformation stack sets: Missing keys in describe_stack_instance response
moto version:
4.1.12
module:
mock_cloudformation
action:
create_change_set
When we create a stack instance and describe it using the following code, the result is not the same as running using boto3:
```
@mock_cloudformation
def ... | diff --git a/moto/cloudformation/models.py b/moto/cloudformation/models.py
--- a/moto/cloudformation/models.py
+++ b/moto/cloudformation/models.py
@@ -272,6 +272,7 @@ def to_dict(self) -> Dict[str, Any]:
"Account": self.account_id,
"Status": "CURRENT",
"ParameterOverrides": self.p... |
getmoto__moto-6816 | [
{
"changes": {
"added_entities": [
"moto/dynamodb/models/dynamo_type.py:DynamoType.is_binary"
],
"added_modules": null,
"edited_entities": [
"moto/dynamodb/models/dynamo_type.py:DynamoType.to_json",
"moto/dynamodb/models/dynamo_type.py:DynamoType.to_regular_json"
... | getmoto/moto | 971e432ad3a7bbe8051b3a9922d5d10e6437146b | [dynamodb] `get_item` of column with binary value not supported from moto>=4.1.12
From `moto>=4.1.12`, the `get_item` operation of a column with binary value is not supported anymore.
From a partial inspection, it looks like the bug has been introduced in the change to support ProjectionExpressions on (nested) list... | diff --git a/moto/dynamodb/models/dynamo_type.py b/moto/dynamodb/models/dynamo_type.py
--- a/moto/dynamodb/models/dynamo_type.py
+++ b/moto/dynamodb/models/dynamo_type.py
@@ -1,3 +1,4 @@
+import base64
import copy
import decimal
@@ -195,6 +196,10 @@ def size(self) -> int:
def to_json(self) -> Dict[str, Any]:... |
getmoto__moto-6106 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/models/route_tables.py:RouteBackend.__validate_destination_cidr_block"
],
"edited_modules": [
"moto/ec2/models/route_tables.py:RouteBackend"
]
},
"file": "moto... | getmoto/moto | 681db433fd086e51d43354b7ad7ba64f6a51e52d | Incorrect behavior when a routing table contains a route for destination cidr 0.0.0.0/0
Hi,
I maybe found an issue. I'm using localstack and I first thought it is an error on the localstack side (see https://github.com/localstack/localstack/issues/7915). But after a little debugging I suspect the problem is in moto.... | diff --git a/moto/ec2/models/route_tables.py b/moto/ec2/models/route_tables.py
--- a/moto/ec2/models/route_tables.py
+++ b/moto/ec2/models/route_tables.py
@@ -514,7 +514,7 @@ def __validate_destination_cidr_block(
for route in route_table.routes.values():
if not route.destination_cidr_block:
... |
getmoto__moto-5940 | [
{
"changes": {
"added_entities": [
"moto/glue/models.py:GlueBackend.update_table"
],
"added_modules": null,
"edited_entities": [
"moto/glue/models.py:GlueBackend.get_table",
"moto/glue/models.py:FakeTable.__init__",
"moto/glue/models.py:FakeTable.update",
... | getmoto/moto | 418c69f477add62271938fbf4c1b8117087f4cd8 | Incorect response when calling glue.get_table_versions
## Reporting Bugs
The current implementation of glue.get_table_versions, see [here](https://github.com/getmoto/moto/blob/78840fd71c365bb40214f59a9d7c5f5f3d00b850/moto/glue/responses.py#L73-L85)
it's different from the actual response from boto3. Specifically ... | diff --git a/moto/glue/models.py b/moto/glue/models.py
--- a/moto/glue/models.py
+++ b/moto/glue/models.py
@@ -130,7 +130,7 @@ def create_table(self, database_name, table_name, table_input):
database.tables[table_name] = table
return table
- def get_table(self, database_name, table_name):
+ de... |
getmoto__moto-5460 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/apigateway/models.py:Resource.delete_method",
"moto/apigateway/models.py:APIGatewayBackend.get_stage"
],
"edited_modules": [
"moto/apigateway/models.py:Resource",
... | getmoto/moto | 4a9b4b27433a40b163517882526caa0eef09547c | API Gateway missing support for webAclArn on API stages
API Gateway supports adding a WAF to API stages in order to control access to the API, but moto is missing support for the webAclArn parameter in the API Gateway models/responses:
https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/#webAclArn
L... | diff --git a/moto/apigateway/models.py b/moto/apigateway/models.py
--- a/moto/apigateway/models.py
+++ b/moto/apigateway/models.py
@@ -372,7 +372,7 @@ def get_method(self, method_type):
return method
def delete_method(self, method_type):
- self.resource_methods.pop(method_type)
+ self.reso... |
getmoto__moto-5417 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/s3/responses.py:S3Response._key_response"
],
"edited_modules": [
"moto/s3/responses.py:S3Response"
]
},
"file": "moto/s3/responses.py"
}
] | getmoto/moto | 3e6394e641f29110ed29deb2e9806e2f9cb7106f | Default ACL not set for multipart upload
## Context
When using moto's implementation of S3's multipart upload to upload an object, the ACL seems like it is not set on the object unless it is specified explicitly by the uploader. This causes problems with subsequent requests to access the object, eg. `HeadObject`.
... | diff --git a/moto/s3/responses.py b/moto/s3/responses.py
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -1156,7 +1156,7 @@ def _key_response(self, request, full_url, headers):
key = self.backend.get_object(bucket_name, key_name)
if key:
- if not key.acl.public_read a... |
getmoto__moto-6885 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/models/instances.py:Instance.__init__"
],
"edited_modules": [
"moto/ec2/models/instances.py:Instance"
]
},
"file": "moto/ec2/models/instances.py"
},
{
... | getmoto/moto | 197e8710afcd311cf3845811dccdea7535711feb | EC2 run instances placement host id is not supported?
I'm checking to make sure that the system is suitable for my use case (version `4.2.5`).
My case is to run aws equivalent:
```
aws ec2 run-instances --image-id ami-0e373a2446example --instance-type m5.large --placement HostId=h-0b1b80b286example --subnet-id sub... | diff --git a/moto/ec2/models/instances.py b/moto/ec2/models/instances.py
--- a/moto/ec2/models/instances.py
+++ b/moto/ec2/models/instances.py
@@ -111,6 +111,7 @@ def __init__(
self.instance_type: str = kwargs.get("instance_type", "m1.small")
self.region_name = kwargs.get("region_name", "us-east-1")
... |
getmoto__moto-5202 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/s3/models.py:FakeKey.__init__",
"moto/s3/models.py:FakeKey.response_dict",
"moto/s3/models.py:S3Backend.__init__",
"moto/s3/models.py:S3Backend.get_object"
],
"e... | getmoto/moto | 4aa5e4388d4a9a7d4a95c265552e2d4b4c1ba376 | Feature Request: Add support for S3 glacier restore transitions
## Feature Request
Adding support for testing the transition when restoring files from S3 Glacier to standard storage class.
## Motivation
When files in S3 are restored from Glacier to standard storage class, the `Restore` attribute (`x-amz-restor... | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -32,6 +32,8 @@
BackendDict,
)
from moto.cloudwatch.models import MetricDatum
+from moto.moto_api import state_manager
+from moto.moto_api._internal.managed_state_model import ManagedState
from moto.utilities.ta... |
getmoto__moto-4847 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/acm/models.py:CertBundle.describe"
],
"edited_modules": [
"moto/acm/models.py:CertBundle"
]
},
"file": "moto/acm/models.py"
}
] | getmoto/moto | de559e450dd921bf7f85b0750001a6cb4f840758 | [ACM] while requesting a certificate with DNS validation no DomainValidationOptions present on describe certificate
## Reporting Bugs
While requesting for a certificate with DNS as the validation option and then Describing the certificate does not return DomainValidationOptions
how to reproduce
```python
acm_cl... | diff --git a/moto/acm/models.py b/moto/acm/models.py
--- a/moto/acm/models.py
+++ b/moto/acm/models.py
@@ -367,17 +367,36 @@ def describe(self):
"KeyAlgorithm": key_algo,
"NotAfter": datetime_to_epoch(self._cert.not_valid_after),
"NotBefore": datetime_to_epoch(self._ce... |
getmoto__moto-7446 | [
{
"changes": {
"added_entities": [
"moto/emr/models.py:FakeInstanceGroup.physical_resource_id",
"moto/emr/models.py:FakeInstanceGroup.cloudformation_type",
"moto/emr/models.py:FakeInstanceGroup.create_from_cloudformation_json"
],
"added_modules": null,
"edited_ent... | getmoto/moto | b13e493823397d3c9aae3598b3b024307f6b0974 | Request AWS::EMR::Cluster resource to be added to cloudformation
Request for AWS::EMR::Cluster to be added to cloudformation. This is used for our testing and we would like to request this resource to be added.
| diff --git a/moto/emr/models.py b/moto/emr/models.py
--- a/moto/emr/models.py
+++ b/moto/emr/models.py
@@ -53,7 +53,7 @@ def __init__(
self.instance_fleet_id = instance_fleet_id
-class FakeInstanceGroup(BaseModel):
+class FakeInstanceGroup(CloudFormationModel):
def __init__(
self,
cl... |
getmoto__moto-6687 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/cloudtrail/models.py:CloudTrailBackend.get_trail_status"
],
"edited_modules": [
"moto/cloudtrail/models.py:CloudTrailBackend"
]
},
"file": "moto/cloudtrail/models.... | getmoto/moto | 1fe69d55a50b404d7c0a59707e88ce03c5ded784 | @mock_cloudtrail is not being able to retrieve the trail status in a different region for a multiregion trail
## Description
As per the AWS Boto3 documentation, the [get_trail_status](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudtrail/client/get_trail_status.html) call is able to g... | diff --git a/moto/cloudtrail/models.py b/moto/cloudtrail/models.py
--- a/moto/cloudtrail/models.py
+++ b/moto/cloudtrail/models.py
@@ -300,21 +300,22 @@ def get_trail(self, name_or_arn: str) -> Trail:
def get_trail_status(self, name: str) -> TrailStatus:
if len(name) < 3:
raise TrailNameTooSh... |
getmoto__moto-6057 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/models/security_groups.py:SecurityRule.__init__",
"moto/ec2/models/security_groups.py:SecurityGroupBackend.authorize_security_group_ingress",
"moto/ec2/models/security_groups.py... | getmoto/moto | e70911fd35e56360359cf15634fe3058c1507776 | Type Error when using revoke_security_group_egress
Hello I am currently getting a type error for the following boto3 method:
- revoke_security_group_egress
This is due to the following lines of code:
https://github.com/getmoto/moto/blob/2c9c7a7a63e7ca0526e433f76902c40801ab02cc/moto/ec2/models/security_groups.py#... | diff --git a/moto/ec2/models/security_groups.py b/moto/ec2/models/security_groups.py
--- a/moto/ec2/models/security_groups.py
+++ b/moto/ec2/models/security_groups.py
@@ -36,16 +36,18 @@ def __init__(
ip_ranges: Optional[List[Any]],
source_groups: List[Dict[str, Any]],
prefix_list_ids: Option... |
getmoto__moto-6410 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/moto_api/_internal/responses.py:MotoAPIResponse.model_data"
],
"edited_modules": [
"moto/moto_api/_internal/responses.py:MotoAPIResponse"
]
},
"file": "moto/moto_a... | getmoto/moto | 1dfbeed5a72a4bd57361e44441d0d06af6a2e58a | server: Overwriting a binary object in S3 causes `/moto-api/data.json` to fail
- **Moto version:** 759f26c6d (git cloned)
- **Python version:** 3.11.4
- **OS:** macOS 13.4
After storing a binary file in S3 on the server and overwriting it, the server's dashboard fails to load due to an unhandled exception while fe... | diff --git a/moto/moto_api/_internal/responses.py b/moto/moto_api/_internal/responses.py
--- a/moto/moto_api/_internal/responses.py
+++ b/moto/moto_api/_internal/responses.py
@@ -68,7 +68,7 @@ def model_data(
if not attr.startswith("_"):
try:
... |
getmoto__moto-6127 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/secretsmanager/models.py:SecretsStore.__setitem__",
"moto/secretsmanager/models.py:SecretsStore.__getitem__",
"moto/secretsmanager/models.py:SecretsStore.__contains__",
"mot... | getmoto/moto | 5c2fc55ea1d2975d5be50dead4f9b49d76feec8b | Secrets Manager backend does not support partial ARNs
The `moto` secrets manager backend is unable to retrieve secrets when a partial ARN is passed as secret ID.
**How to reproduce the issue**
Here is a minimal example that demonstrates the issue:
```python
import boto3
import pytest
from moto import mock_secre... | diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py
--- a/moto/secretsmanager/models.py
+++ b/moto/secretsmanager/models.py
@@ -16,7 +16,7 @@
InvalidRequestException,
ClientError,
)
-from .utils import random_password, secret_arn, get_secret_name_from_arn
+from .utils import random_pas... |
getmoto__moto-4787 | [
{
"changes": {
"added_entities": [
"moto/dynamodb2/exceptions.py:MultipleTransactionsException.__init__"
],
"added_modules": [
"moto/dynamodb2/exceptions.py:MultipleTransactionsException"
],
"edited_entities": null,
"edited_modules": null
},
"file": "m... | getmoto/moto | 01f5193cb644ea97e65cec4827b8ccc36565e69f | DynamoDb2.client.transact_write_items transactions on same item
transact_write_items does not allow several transactions on the same item
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#DynamoDB.Client.transact_write_items
> TransactWriteItems is a synchronous write operatio... | diff --git a/moto/dynamodb2/exceptions.py b/moto/dynamodb2/exceptions.py
--- a/moto/dynamodb2/exceptions.py
+++ b/moto/dynamodb2/exceptions.py
@@ -174,6 +174,13 @@ def __init__(self, errors):
super().__init__(msg)
+class MultipleTransactionsException(MockValidationException):
+ msg = "Transaction reques... |
getmoto__moto-7635 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/sns/models.py:SNSBackend.create_platform_endpoint"
],
"edited_modules": [
"moto/sns/models.py:SNSBackend"
]
},
"file": "moto/sns/models.py"
}
] | getmoto/moto | e51192b71db45d79b68c56d5e6c36af9d8a497b9 | SNS: `create_platform_endpoint` is not idempotent with default attributes
According to [AWS Documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sns/client/create_platform_endpoint.html#), `create_platform_endpoint` is idempotent, so if an endpoint is created with the same token and... | diff --git a/moto/sns/models.py b/moto/sns/models.py
--- a/moto/sns/models.py
+++ b/moto/sns/models.py
@@ -679,7 +679,7 @@ def create_platform_endpoint(
if token == endpoint.token:
same_user_data = custom_user_data == endpoint.custom_user_data
same_attrs = (
- ... |
getmoto__moto-4875 | [
{
"changes": {
"added_entities": [
"moto/cloudtrail/models.py:Trail.put_event_selectors",
"moto/cloudtrail/models.py:Trail.get_event_selectors",
"moto/cloudtrail/models.py:Trail.put_insight_selectors",
"moto/cloudtrail/models.py:Trail.get_insight_selectors",
"moto/c... | getmoto/moto | 876c783a243a34f36bcd067e9f97a7afa5d87297 | CloudTrail NotImplementedError: The put_event_selectors action has not been implemented
## reproduce the issue using below code piece
* The Class file
```
import logging
import boto3
import json
from botocore.exceptions import ClientError
class accessLogger:
logger = logging.getLogger()
def __i... | diff --git a/moto/cloudtrail/models.py b/moto/cloudtrail/models.py
--- a/moto/cloudtrail/models.py
+++ b/moto/cloudtrail/models.py
@@ -4,6 +4,7 @@
from datetime import datetime
from moto.core import ACCOUNT_ID, BaseBackend, BaseModel
from moto.core.utils import iso_8601_datetime_without_milliseconds, BackendDict
+fr... |
getmoto__moto-7490 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/kinesis/responses.py:KinesisResponse.list_streams"
],
"edited_modules": [
"moto/kinesis/responses.py:KinesisResponse"
]
},
"file": "moto/kinesis/responses.py"
}
... | getmoto/moto | db862bcf3b5ea051d412620caccbc08d72c8f441 | Adding `StreamSummaries` to kinesis.list_streams response
The default [boto3 response](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/kinesis/client/list_streams.html) includes the `StreamSummaries` key. Can this be included?
https://github.com/getmoto/moto/blob/69fc969e9835a5dd30d4e4d440d0... | diff --git a/moto/kinesis/responses.py b/moto/kinesis/responses.py
--- a/moto/kinesis/responses.py
+++ b/moto/kinesis/responses.py
@@ -53,7 +53,14 @@ def list_streams(self) -> str:
has_more_streams = True
return json.dumps(
- {"HasMoreStreams": has_more_streams, "StreamNames": streams... |
getmoto__moto-5699 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "moto/cloudfront/responses.py"
}
] | getmoto/moto | b4f59b771cc8a89976cbea8c889758c132d405d0 | CloudFront: list_invalidations includes empty element if no invalidations
## How to reproduce the issue
```python
@mock_cloudfront
def test_list_invalidations__no_entries():
client = boto3.client("cloudfront", region_name="us-west-1")
resp = client.list_invalidations(
DistributionId="SPAM",
... | diff --git a/moto/cloudfront/responses.py b/moto/cloudfront/responses.py
--- a/moto/cloudfront/responses.py
+++ b/moto/cloudfront/responses.py
@@ -622,6 +622,7 @@ def list_tags_for_resource(self) -> TYPE_RESPONSE:
INVALIDATIONS_TEMPLATE = """<?xml version="1.0" encoding="UTF-8"?>
<InvalidationList>
<IsTruncated>f... |
getmoto__moto-5794 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/cognitoidp/models.py:CognitoIdpUserPool.sign_out"
],
"edited_modules": [
"moto/cognitoidp/models.py:CognitoIdpUserPool"
]
},
"file": "moto/cognitoidp/models.py"
... | getmoto/moto | 027572177da3e95b8f5b4a3e611fe6a7f969e1b1 | Bug: global_sign_out does not actually sign out
The current test code for `global_sign_out` only checks against a refresh token action. If you do a sign out and try to access a protected endpoint, like say `get_user(AccessToken)`, it should result to `NotAuthorizedException`. This is not the case as of the current vers... | diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py
--- a/moto/cognitoidp/models.py
+++ b/moto/cognitoidp/models.py
@@ -627,6 +627,10 @@ def sign_out(self, username: str) -> None:
_, logged_in_user = token_tuple
if username == logged_in_user:
self.refresh_tokens... |
getmoto__moto-6756 | [
{
"changes": {
"added_entities": [
"moto/sagemaker/models.py:FakeSagemakerNotebookInstance.to_dict",
"moto/sagemaker/models.py:SageMakerModelBackend.list_notebook_instances"
],
"added_modules": null,
"edited_entities": [
"moto/sagemaker/models.py:FakeSagemakerNote... | getmoto/moto | c59fee5d352e429309ddce7f8350ef70f2003593 | [Feature request] SageMaker list and notebook instances
Currently Moto can create a fake SageMaker notebook instance, and delete it, and describe it's lifecycle config, and list tags for it.
I want to add functionality to list notebook instances, including the `list_notebook_instances` paginator.
This is somethin... | diff --git a/moto/sagemaker/models.py b/moto/sagemaker/models.py
--- a/moto/sagemaker/models.py
+++ b/moto/sagemaker/models.py
@@ -29,35 +29,36 @@
"limit_key": "MaxResults",
"limit_default": 100,
"unique_attribute": "experiment_arn",
- "fail_on_invalid_token": True,
},
"list_... |
getmoto__moto-4808 | [
{
"changes": {
"added_entities": [
"moto/elbv2/models.py:ELBv2Backend.modify_target_group_attributes"
],
"added_modules": null,
"edited_entities": [
"moto/elbv2/models.py:FakeTargetGroup.__init__",
"moto/elbv2/models.py:ELBv2Backend.create_target_group",
"... | getmoto/moto | f158f0e9859e96c71bc0201ec7558bb817aee7d8 | Feature Request ELBv2 Add and Remove Listener Certificates
Please can I request the following features are added to the ELBv2 service.
1. Replace a listener default certificate using the modify_listener function.
```
response = self.client.modify_listener(
Certificates=[
{
'Certificate... | diff --git a/moto/elbv2/models.py b/moto/elbv2/models.py
--- a/moto/elbv2/models.py
+++ b/moto/elbv2/models.py
@@ -62,6 +62,7 @@ def __init__(
vpc_id,
protocol,
port,
+ protocol_version=None,
healthcheck_protocol=None,
healthcheck_port=None,
healthcheck_path=... |
getmoto__moto-4972 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/logs/responses.py:validate_param",
"moto/logs/responses.py:LogsResponse.put_metric_filter",
"moto/logs/responses.py:LogsResponse.describe_metric_filters",
"moto/logs/respons... | getmoto/moto | 1f9f4af1c42ca73224123a558102f565a62cd7ab | mock_logs delete_metric_filter raises unexpected InvalidParameterException
#### Issue description
When using the `moto.mock_logs`, `boto3` fails to delete a metric_filter arguing that the `logGroupName` parameter is invalid, even if the log group already exists and that the metric_filter was already created using th... | diff --git a/moto/logs/responses.py b/moto/logs/responses.py
--- a/moto/logs/responses.py
+++ b/moto/logs/responses.py
@@ -9,6 +9,9 @@
# See http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/Welcome.html
+REGEX_LOG_GROUP_NAME = r"[-._\/#A-Za-z0-9]+"
+
+
def validate_param(
param_name, param... |
getmoto__moto-5340 | [
{
"changes": {
"added_entities": [
"moto/iam/models.py:IAMBackend.update_assume_role_policy"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"moto/iam/models.py:IAMBackend"
]
},
"file": "moto/iam/models.py"
},
{
"changes"... | getmoto/moto | d28c4bfb9390e04b9dadf95d778999c0c493a50a | Feature request: Implement IAM back end part of update_assume_role_policy to validate policies
Hello,
The current implementation of update_assume_role_policy for IAM can validate the policy passed in.
I would like to validate this data, so that invalid policies will receive an exception
| diff --git a/moto/iam/models.py b/moto/iam/models.py
--- a/moto/iam/models.py
+++ b/moto/iam/models.py
@@ -21,7 +21,10 @@
iso_8601_datetime_with_milliseconds,
BackendDict,
)
-from moto.iam.policy_validation import IAMPolicyDocumentValidator
+from moto.iam.policy_validation import (
+ IAMPolicyDocumentVali... |
getmoto__moto-7579 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/models/transit_gateway_attachments.py:TransitGatewayAttachmentBackend.delete_transit_gateway_vpc_attachment"
],
"edited_modules": [
"moto/ec2/models/transit_gateway_attachme... | getmoto/moto | dfda856838734dab577ea154699809f2bd767812 | AWS TgwRT : Attachment Propagations should be a list of dicts
https://github.com/getmoto/moto/blob/a7ce969b260ac87604d7b87a171d8ce5d3c7b60c/moto/ec2/models/transit_gateway_route_tables.py#L31
FROM:
```
self.route_table_association: Dict[str, str] = {}
self.route_table_propagation: Dict[str, str] =... | diff --git a/moto/ec2/models/transit_gateway_attachments.py b/moto/ec2/models/transit_gateway_attachments.py
--- a/moto/ec2/models/transit_gateway_attachments.py
+++ b/moto/ec2/models/transit_gateway_attachments.py
@@ -222,6 +222,18 @@ def delete_transit_gateway_vpc_attachment(
transit_gateway_attachment_i... |
getmoto__moto-7347 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/secretsmanager/models.py:SecretsManagerBackend.rotate_secret"
],
"edited_modules": [
"moto/secretsmanager/models.py:SecretsManagerBackend"
]
},
"file": "moto/secre... | getmoto/moto | e6818c3f1d3e8f552e5de736f68029b4efd1994f | moto3 secret_manager does not honor `@mock_aws(config={"lambda": {"use_docker": False}})` for secret rotation
moto3 5.0.1 installed via pip and requrirements.txt
using python mocks with boto3 1.34.41
```
import io
import zipfile
import boto3
import os
import pytest
from botocore.exceptions import ClientErro... | diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py
--- a/moto/secretsmanager/models.py
+++ b/moto/secretsmanager/models.py
@@ -660,6 +660,7 @@ def rotate_secret(
client_request_token: Optional[str] = None,
rotation_lambda_arn: Optional[str] = None,
rotation_rules: Opti... |
getmoto__moto-5509 | [
{
"changes": {
"added_entities": [
"moto/ec2/models/route_tables.py:RouteTable.all_associations_ids"
],
"added_modules": null,
"edited_entities": [
"moto/ec2/models/route_tables.py:RouteTable.__init__",
"moto/ec2/models/route_tables.py:RouteTable.get_filter_value"... | getmoto/moto | 3118090fdc38de64e0a7aef969b3b1992c1703f5 | moto's ec2 ReplaceRouteTableAssociationResponse lacks associationState element
Calling ec2:ReplaceRouteTableAssociation returns an incomplete response, lacking associationState element, which may confuse some external tools.
This is fixed by an upcoming patch. This bug report is for issue tracking purposes only.
| diff --git a/moto/ec2/models/route_tables.py b/moto/ec2/models/route_tables.py
--- a/moto/ec2/models/route_tables.py
+++ b/moto/ec2/models/route_tables.py
@@ -25,8 +25,10 @@ def __init__(self, ec2_backend, route_table_id, vpc_id, main=False):
self.ec2_backend = ec2_backend
self.id = route_table_id
... |
getmoto__moto-5043 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ses/models.py:SESBackend.verify_email_identity"
],
"edited_modules": [
"moto/ses/models.py:SESBackend"
]
},
"file": "moto/ses/models.py"
}
] | getmoto/moto | fc170df79621e78935e0feabf0037773b45f12dd | SES verify_email_identity is not idempotent
Using `verify_email_identity` on an existing identity with boto3 allows to re-send the verification email, without creating a duplicate identity.
However, in moto it duplicates the identity.
```python3
import boto3
from moto import mock_ses
@mock_ses
def verify():... | diff --git a/moto/ses/models.py b/moto/ses/models.py
--- a/moto/ses/models.py
+++ b/moto/ses/models.py
@@ -132,7 +132,8 @@ def _is_verified_address(self, source):
def verify_email_identity(self, address):
_, address = parseaddr(address)
- self.addresses.append(address)
+ if address not in ... |
getmoto__moto-7607 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_callback.py:StateTaskServiceCallback._wait_for_task_token"
],
"edited_modules": [
"moto/stepf... | getmoto/moto | ca24f65f2ff415a7eb7eddcea3bd8173e5d5f920 | Cryptic error when using start_execution with Moto 5.0.5
## Reporting Bugs
Moto version: 5.0.5
Issue: Currently can not test `send_task_success` or `send_task_failure` with Moto 5.0.4+ yet due to the state machine doesn't run properly with `waitForTaskToken` integration type.
Running following test snippet:
... | diff --git a/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_callback.py b/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_callback.py
--- a/moto/stepfunctions/parser/asl/component/state/exec/state_task/service/state_task_service_callback... |
getmoto__moto-5959 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/kms/models.py:KmsBackend.any_id_to_key_id"
],
"edited_modules": [
"moto/kms/models.py:KmsBackend"
]
},
"file": "moto/kms/models.py"
}
] | getmoto/moto | d1e3f50756fdaaea498e8e47d5dcd56686e6ecdf | KMS `encrypt` operation doesn't resolve aliases as expected
Hi, I'm trying to use Moto's KMS implementation to test some code that uses boto3's KMS client to encrypt and decrypt data. When using key aliases, I'm running into some unexpected behavior that doesn't seem to match the behavior of AWS proper: I'm unable to s... | diff --git a/moto/kms/models.py b/moto/kms/models.py
--- a/moto/kms/models.py
+++ b/moto/kms/models.py
@@ -363,7 +363,7 @@ def any_id_to_key_id(self, key_id):
key_id = self.get_alias_name(key_id)
key_id = self.get_key_id(key_id)
if key_id.startswith("alias/"):
- key_id = self.get_k... |
getmoto__moto-5503 | [
{
"changes": {
"added_entities": [
"moto/rds/models.py:RDSBackend.create_db_instance_read_replica"
],
"added_modules": null,
"edited_entities": [
"moto/rds/models.py:Database.add_replica",
"moto/rds/models.py:Database.create_from_cloudformation_json",
"mot... | getmoto/moto | 76b127bba65771c1d3f279cd2c69309959b675d8 | RDS ReadReplicaDBInstanceIdentifiers and SourceDBInstanceIdentifier show db-name for cross-region replication
Currently in all cases, moto will use a database's name for the `ReadReplicaDBInstanceIdentifiers` and `SourceDBInstanceIdentifier` fields in the RDSBackend.
This aligns with AWS's states for same-region r... | diff --git a/moto/rds/models.py b/moto/rds/models.py
--- a/moto/rds/models.py
+++ b/moto/rds/models.py
@@ -644,7 +644,11 @@ def address(self):
)
def add_replica(self, replica):
- self.replicas.append(replica.db_instance_identifier)
+ if self.region_name != replica.region_name:
+ ... |
getmoto__moto-6905 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/responses/instances.py:InstanceResponse.run_instances"
],
"edited_modules": [
"moto/ec2/responses/instances.py:InstanceResponse"
]
},
"file": "moto/ec2/respons... | getmoto/moto | 760e28bb7f6934a4c1ee664eee2449c216c06d9b | EC2 run instances with --iam-instance-profile strange error
I encounter strange behavior with `aws ec2 run-instances` which includes `--iam-instance-profile` flag.
With simple
```
aws ec2 run-instances --image-id ami-example1234567890
```
it works fine, instance is created. I get 200 response in log:
```
192.1... | diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py
--- a/moto/ec2/responses/instances.py
+++ b/moto/ec2/responses/instances.py
@@ -5,6 +5,7 @@
InvalidParameterCombination,
InvalidRequest,
)
+from moto.ec2.utils import filter_iam_instance_profiles
from copy import deepcopy
@@ ... |
getmoto__moto-5044 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/autoscaling/models.py:FakeLaunchConfiguration.create_from_instance",
"moto/autoscaling/models.py:FakeLaunchConfiguration._parse_block_device_mappings",
"moto/autoscaling/models.py:F... | getmoto/moto | f8c2b621dbb281a2025bcc8db9231ad89ea459d8 | Support volumes for LaunchTemplates
```python
import boto3
from moto import mock_ec2
from moto.ec2.models import AMIS
mock = mock_ec2()
mock.start()
ami_id = AMIS[0]["ami_id"]
ec2_client = boto3.client("ec2", region_name="ap-southeast-2")
ec2_client.create_launch_template(
LaunchTemplateName="launchi... | diff --git a/moto/autoscaling/models.py b/moto/autoscaling/models.py
--- a/moto/autoscaling/models.py
+++ b/moto/autoscaling/models.py
@@ -163,7 +163,8 @@ def create_from_instance(cls, name, instance, backend):
spot_price=None,
ebs_optimized=instance.ebs_optimized,
associate_publi... |
getmoto__moto-5134 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/events/models.py:EventPattern._does_event_match",
"moto/events/models.py:EventPattern._does_item_match_named_filter"
],
"edited_modules": [
"moto/events/models.py:EventP... | getmoto/moto | 0e3ac260682f3354912fe552c61d9b3e590903b8 | EventBridge rule doesn't match null value with "exists" filter
### What I expected to happen
I expected moto to match null values with `{"exists": true}` as this is the way AWS behaves.
### What actually happens
Moto doesn't seem to match null values with `{"exists": true}`.
### How to reproduce the issue
... | diff --git a/moto/events/models.py b/moto/events/models.py
--- a/moto/events/models.py
+++ b/moto/events/models.py
@@ -33,6 +33,9 @@
from .utils import PAGINATION_MODEL
+# Sentinel to signal the absence of a field for `Exists` pattern matching
+UNDEFINED = object()
+
class Rule(CloudFormationModel):
Arn = ... |
getmoto__moto-6086 | [
{
"changes": {
"added_entities": [
"moto/cloudformation/models.py:FakeStack.cloudformation_type",
"moto/cloudformation/models.py:FakeStack.has_cfn_attr",
"moto/cloudformation/models.py:FakeStack.physical_resource_id",
"moto/cloudformation/models.py:FakeStack.create_from_clo... | getmoto/moto | 8bf55cbe0e9000bc9ec08281f8442a2cffa522ad | Feat: Cloudformation Stack (as cludformation resource)
Stacks are already supported via `mock_cloudformation`
```
boto_cloudformation_client.create_stack(StackName=stack_name, TemplateBody=str(template_dict))
```
Would be good to be able to use cloudformation as well to create new stacks.
Example resource templa... | diff --git a/moto/cloudformation/models.py b/moto/cloudformation/models.py
--- a/moto/cloudformation/models.py
+++ b/moto/cloudformation/models.py
@@ -25,6 +25,7 @@
generate_stackset_id,
yaml_tag_constructor,
validate_template_cfn_lint,
+ get_stack_from_s3_url,
)
from .exceptions import ValidationEr... |
getmoto__moto-5504 | [
{
"changes": {
"added_entities": [
"moto/dynamodb/exceptions.py:DuplicateUpdateExpression.__init__"
],
"added_modules": [
"moto/dynamodb/exceptions.py:DuplicateUpdateExpression"
],
"edited_entities": null,
"edited_modules": null
},
"file": "moto/dynamo... | getmoto/moto | f082562b0fa0a8c01a02770b23891a18127e3aca | DynamoDB UpdateItem error: Two document paths overlap with each other
## Reporting Bugs
Moto Version: 3.1.15.dev7
The following error occurred in DynamoDB on AWS, but passed in Moto.
```
An error occurred (ValidationException) when calling the UpdateItem operation: Invalid UpdateExpression:
Two document pat... | diff --git a/moto/dynamodb/exceptions.py b/moto/dynamodb/exceptions.py
--- a/moto/dynamodb/exceptions.py
+++ b/moto/dynamodb/exceptions.py
@@ -262,6 +262,13 @@ def __init__(self, name, expected_type, actual_type):
super().__init__(self.msg.format(name, expected_type, actual_type))
+class DuplicateUpdateExp... |
getmoto__moto-6802 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/stepfunctions/responses.py:StepFunctionResponse.list_executions"
],
"edited_modules": [
"moto/stepfunctions/responses.py:StepFunctionResponse"
]
},
"file": "moto/s... | getmoto/moto | 03cc7856158f86e2aede55ac9f764657fd69138e | stepfunctions list_executions with aborted execution does not return stopDate attribute in response
Hey Folks,
Looks like we are missing the `stopDate` attribute being set for `list-executions` responses for non `RUNNING` statemachines.
Moto version: `4.1.9`
(sample aws cli call returning stop date with ABO... | diff --git a/moto/stepfunctions/responses.py b/moto/stepfunctions/responses.py
--- a/moto/stepfunctions/responses.py
+++ b/moto/stepfunctions/responses.py
@@ -141,6 +141,7 @@ def list_executions(self) -> TYPE_RESPONSE:
"executionArn": execution.execution_arn,
"name": execution.name,
... |
getmoto__moto-4908 | [
{
"changes": {
"added_entities": [
"moto/ec2/models.py:VPCEndPoint.physical_resource_id",
"moto/ec2/models.py:VPCEndPoint.cloudformation_name_type",
"moto/ec2/models.py:VPCEndPoint.cloudformation_type",
"moto/ec2/models.py:VPCEndPoint.create_from_cloudformation_json"
... | getmoto/moto | dc5353f1aeedbd4c182ed3ce3e3e90acd555e154 | VPC endpoint not created as part of cloudformation create stack
Hi,
I'm using the latest version of moto(3.0.5).
I have a simple cft template that creates GWLB vpc endpoint and subnet given service name, vpcId, az and CIDR block for the subnet. Everything works fine when deploying in AWS.
With the current mo... | diff --git a/moto/ec2/models.py b/moto/ec2/models.py
--- a/moto/ec2/models.py
+++ b/moto/ec2/models.py
@@ -4142,7 +4142,7 @@ def delete_vpc_endpoints(self, vpce_ids=None):
for vpce_id in vpce_ids or []:
vpc_endpoint = self.vpc_end_points.get(vpce_id, None)
if vpc_endpoint:
- ... |
getmoto__moto-7144 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/acm/models.py:CertBundle.describe"
],
"edited_modules": [
"moto/acm/models.py:CertBundle"
]
},
"file": "moto/acm/models.py"
}
] | getmoto/moto | 34a0c20d036240a3bdf5ec03221bc629427e2315 | ACM certificate does not work with subject alternative names
# Problem
I am unable to successfully run the following Terraform code when the `subject_alternative_names` param is passed to the `aws_acm_certificate` resource. Terraform also shows that there are changes every run due to switching values from the default ... | diff --git a/moto/acm/models.py b/moto/acm/models.py
--- a/moto/acm/models.py
+++ b/moto/acm/models.py
@@ -337,25 +337,32 @@ def describe(self) -> Dict[str, Any]:
"ExtendedKeyUsages": [],
"RenewalEligibility": "INELIGIBLE",
"Options": {"CertificateTransparencyLoggingPr... |
getmoto__moto-6726 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/core/responses.py:BaseResponse.__init__",
"moto/core/responses.py:BaseResponse.setup_class"
],
"edited_modules": [
"moto/core/responses.py:BaseResponse"
]
},
... | getmoto/moto | 18e382c8ca06bda16c16e39d1f6d24ddfca1820c | Upcoming Compression changes in Boto3
Hi there,
I'm reaching out from the Boto3 team about a recently released feature (https://github.com/boto/botocore/pull/2959) that may have some implications on how moto works with request body parsing. In order to help optimize bytes sent over the wire, boto3 will slowly start ... | diff --git a/moto/core/responses.py b/moto/core/responses.py
--- a/moto/core/responses.py
+++ b/moto/core/responses.py
@@ -14,6 +14,7 @@
from moto.core.exceptions import DryRunClientError
from moto.core.utils import (
camelcase_to_underscores,
+ gzip_decompress,
method_names_from_class,
params_sort_... |
getmoto__moto-4975 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/models.py:Instance.prep_nics"
],
"edited_modules": [
"moto/ec2/models.py:Instance"
]
},
"file": "moto/ec2/models.py"
}
] | getmoto/moto | afa34ffd8d727c3e67d0fa8d515f498ba165fbe1 | ec2 security group - TypeError: unhashable type: 'list'
_unhashable.py_:
```python
import boto3
from moto import mock_ec2
from moto.ec2 import ec2_backends
from moto.ec2.models import AMIS
mock = mock_ec2()
mock.start()
ec2_client = boto3.client("ec2", region_name="us-east-1")
ec2_client.run_instances(
... | diff --git a/moto/ec2/models.py b/moto/ec2/models.py
--- a/moto/ec2/models.py
+++ b/moto/ec2/models.py
@@ -1034,8 +1034,7 @@ def prep_nics(
zone = self._placement.zone
subnet = self.ec2_backend.get_default_subnet(availability_zone=zone)
- group_id = nic.get("Se... |
getmoto__moto-4896 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/core/custom_responses_mock.py:_find_first_match_legacy",
"moto/core/custom_responses_mock.py:_find_first_match"
],
"edited_modules": [
"moto/core/custom_responses_mock.p... | getmoto/moto | 8bbfe9c151e62952b153f483d3604b57c7e99ab6 | moto breaks repsonses library usage
if moto is used with responses for mocking request responses library will be broken
```python
import responses
from moto import mock_s3
@mock_s3
@responses.activate
def test():
responses.add(
responses.POST,
url='http://someurl',
body="4",
... | diff --git a/moto/core/custom_responses_mock.py b/moto/core/custom_responses_mock.py
--- a/moto/core/custom_responses_mock.py
+++ b/moto/core/custom_responses_mock.py
@@ -100,7 +100,8 @@ def not_implemented_callback(request):
# - Same request, executed again, will be matched on the subsequent match, which happens to ... |
getmoto__moto-7509 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/acm/models.py:AWSCertificateManagerBackend.default_vpc_endpoint_service"
],
"edited_modules": [
"moto/acm/models.py:AWSCertificateManagerBackend"
]
},
"file": "mot... | getmoto/moto | b22683eb98cb3de13d44f5348665f44539afa36f | VPC Endpoint services are missing bedrock related endpoints
Attempting to call the `describe_vpc_endpoint_services` operation results in an error:
`botocore.exceptions.ClientError: An error occurred (InvalidServiceName) when calling the DescribeVpcEndpointServices operation: The Vpc Endpoint Service 'com.amazonaws.u... | diff --git a/moto/acm/models.py b/moto/acm/models.py
--- a/moto/acm/models.py
+++ b/moto/acm/models.py
@@ -409,15 +409,6 @@ def __init__(self, region_name: str, account_id: str):
self._certificates: Dict[str, CertBundle] = {}
self._idempotency_tokens: Dict[str, Any] = {}
- @staticmethod
- def ... |
getmoto__moto-5347 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "moto/ec2/responses/instances.py"
}
] | getmoto/moto | 23c4f47635c0534d8448a09dd54a5f4b82966ce1 | ec2 created without keypair has KeyName = 'None'
When creating an instance without a keypair, moto describes the instance as having a keypair called`None`:
```python
import boto3
from moto import mock_ec2
mock = mock_ec2()
mock.start()
ec2_client = boto3.client("ec2", region_name="us-east-1")
ec2_client.ru... | diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py
--- a/moto/ec2/responses/instances.py
+++ b/moto/ec2/responses/instances.py
@@ -406,7 +406,9 @@ def _convert_to_bool(bool_str):
<publicDnsName>{{ instance.public_dns }}</publicDnsName>
<dnsName>{{ instance.public_dns }}... |
getmoto__moto-5885 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/eks/models.py:ManagedNodegroup.__init__"
],
"edited_modules": [
"moto/eks/models.py:ManagedNodegroup"
]
},
"file": "moto/eks/models.py"
}
] | getmoto/moto | 67197cb8a566ee5d598905f836c90de8ee9399e1 | EKS DescribeNodegroup not returning id or name launch template attribute in response
The boto3 EKS DescribeNodegroup response returns the following for LaunchTemplate:
`'launchTemplate': {
'name': 'string',
'version': 'string',
'id': 'string'
},`
However, the moto res... | diff --git a/moto/eks/models.py b/moto/eks/models.py
--- a/moto/eks/models.py
+++ b/moto/eks/models.py
@@ -284,6 +284,25 @@ def __init__(
self.tags = tags
self.taints = taints
+ # Determine LaunchTemplateId from Name (and vice versa)
+ try:
+ from moto.ec2.models import ec2_... |
getmoto__moto-7208 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/dynamodb/models/table.py:Table.query",
"moto/dynamodb/models/table.py:Table._trim_results"
],
"edited_modules": [
"moto/dynamodb/models/table.py:Table"
]
},
... | getmoto/moto | 624de34d82a1b2c521727b14a2173380e196f1d8 | DynamoDB Table.query() returns the wrong ScannedCount value
## Description
The `Table.query()` method returns the total number of items in the stable instead of the total number of items with the specified partition key.
## Steps to reproduce
```python
import boto3
from boto3.dynamodb.conditions import Key
... | diff --git a/moto/dynamodb/models/table.py b/moto/dynamodb/models/table.py
--- a/moto/dynamodb/models/table.py
+++ b/moto/dynamodb/models/table.py
@@ -656,8 +656,8 @@ def query(
filter_expression: Any = None,
**filter_kwargs: Any,
) -> Tuple[List[Item], int, Optional[Dict[str, Any]]]:
- re... |
getmoto__moto-6567 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/rds/models.py:Cluster.__init__",
"moto/rds/models.py:Cluster.to_xml"
],
"edited_modules": [
"moto/rds/models.py:Cluster"
]
},
"file": "moto/rds/models.py"
... | getmoto/moto | b52fd80cb1cfd8ecc02c3ec75f481001d33c194e | Missing vpc security group name from rds.create_db_cluster response
## Reporting Bugs
When we provide a vpc security group id for rds.create_db_cluster, the response of this create returns an empty list for `'VpcSecurityGroups': []`. I am using boto3 & mocking this call using moto library's mock_rds method.
The r... | diff --git a/moto/rds/models.py b/moto/rds/models.py
--- a/moto/rds/models.py
+++ b/moto/rds/models.py
@@ -182,7 +182,7 @@ def __init__(self, **kwargs: Any):
self.preferred_backup_window = "01:37-02:07"
self.preferred_maintenance_window = "wed:02:40-wed:03:10"
# This should default to the def... |
getmoto__moto-6510 | [
{
"changes": {
"added_entities": [
"moto/scheduler/models.py:Schedule.update"
],
"added_modules": null,
"edited_entities": [
"moto/scheduler/models.py:Schedule.__init__",
"moto/scheduler/models.py:Schedule.to_dict",
"moto/scheduler/models.py:EventBridgeSch... | getmoto/moto | 1b2dfbaf569d21c5a3a1c35592325b09b3c697f4 | Scheduler get_schedule Incomplete Response
The response of Eventbridge Scheduler get_schedule is missing CreationDate and LastModificationDate. These are both part of the response syntax in the boto3 documentation and are missing.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/scheduler/... | diff --git a/moto/scheduler/models.py b/moto/scheduler/models.py
--- a/moto/scheduler/models.py
+++ b/moto/scheduler/models.py
@@ -39,6 +39,7 @@ def __init__(
self.kms_key_arn = kms_key_arn
self.start_date = start_date
self.end_date = end_date
+ self.creation_date = self.last_modified_... |
getmoto__moto-6157 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/s3/responses.py:S3Response._key_response_head"
],
"edited_modules": [
"moto/s3/responses.py:S3Response"
]
},
"file": "moto/s3/responses.py"
}
] | getmoto/moto | fe1869212f17f030ec27ddf96753726af55c6670 | Missing accept-ranges from mocked S3 service API response
moto version 4.1.5 - botocore 1.29.96 - boto3 1.26.87 - s3resumable 0.0.3
Am using S3Resumable to handle my file downloads even when interrupted.
Long story short, I am able to mock s3 but it seems the output it generates when getting an object from the ... | diff --git a/moto/s3/responses.py b/moto/s3/responses.py
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -1636,6 +1636,7 @@ def _key_response_head(self, bucket_name, query, key_name, headers):
if key:
response_headers.update(key.metadata)
response_headers.update(key.response_... |
getmoto__moto-5745 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"moto/core/responses.py:BaseResponse"
]
},
"file": "moto/core/responses.py"
}
] | getmoto/moto | d551a4dffddb16fc4bdb2998f39f76fd4d3b2657 | When using a NONEXISTENT_REGION, `get_id` of `mock_cognitoidentity` fails
When using a NONEXISTENT_REGION, `get_id` of `mock_cognitoidentity` fails because the request made by `botocore` does not contain the `Authorization header`
I have tried this with `python>=3.8`
Here it follows an example `get_id` request:
... | diff --git a/moto/core/responses.py b/moto/core/responses.py
--- a/moto/core/responses.py
+++ b/moto/core/responses.py
@@ -204,7 +204,8 @@ class BaseResponse(_TemplateEnvironmentMixin, ActionAuthenticatorMixin):
default_region = "us-east-1"
# to extract region, use [^.]
- region_regex = re.compile(r"\.(?... |
getmoto__moto-5837 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/core/botocore_stubber.py:BotocoreStubber.__call__"
],
"edited_modules": [
"moto/core/botocore_stubber.py:BotocoreStubber"
]
},
"file": "moto/core/botocore_stubber.... | getmoto/moto | 6da12892a3c18248a2cfe55bc7d2cb3039817684 | Calls to list_attached_policies fail with ARN targets
Hi,
there's a slight issue with ARN targets when calling `list_attached_policies`.
Versions:
```
boto3==1.26.33
botocore==1.29.33
moto==4.0.12
```
Python 3.11
Fixtures I'm using:
```python
@pytest.fixture(scope="session")
def aws_credentials():... | diff --git a/moto/core/botocore_stubber.py b/moto/core/botocore_stubber.py
--- a/moto/core/botocore_stubber.py
+++ b/moto/core/botocore_stubber.py
@@ -43,18 +43,13 @@ def __call__(self, event_name: str, request: Any, **kwargs: Any) -> AWSResponse:
response = None
response_callback = None
- fo... |
getmoto__moto-5560 | [
{
"changes": {
"added_entities": [
"moto/dynamodb/parsing/ast_nodes.py:UpdateExpressionPath.to_str",
"moto/dynamodb/parsing/ast_nodes.py:ExpressionPathDescender.to_str",
"moto/dynamodb/parsing/ast_nodes.py:ExpressionSelector.to_str",
"moto/dynamodb/parsing/ast_nodes.py:Expr... | getmoto/moto | 67c688b1872d50487f59fdd041163aaa09b1318c | DynamoDB raising "Invalid UpdateExpression" for a valid expression
PR #5504 is too strict and will raise an exception for valid DynamoDB update expressions.
For instance, according to the [documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.U... | diff --git a/moto/dynamodb/parsing/ast_nodes.py b/moto/dynamodb/parsing/ast_nodes.py
--- a/moto/dynamodb/parsing/ast_nodes.py
+++ b/moto/dynamodb/parsing/ast_nodes.py
@@ -27,9 +27,8 @@ def validate(self):
if nr_of_clauses > 1:
raise TooManyAddClauses()
set_actions = self.find_... |
getmoto__moto-6176 | [
{
"changes": {
"added_entities": [
"moto/kinesis/models.py:KinesisBackend.send_log_event"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"moto/kinesis/models.py:KinesisBackend"
]
},
"file": "moto/kinesis/models.py"
},
{
... | getmoto/moto | 9f91ac0eb96b1868905e1555cb819757c055b652 | CloudWatchLog's put_subscription_filter() does not accept kinesis data stream destination
How to reproduce: Write a test which puts a subscription filter to a cloudwatch loggroup, mocking the loggroup name, the kinesis data stream, and the role arn. When the test calls the boto3 method put_subscription_filter(), the f... | diff --git a/moto/kinesis/models.py b/moto/kinesis/models.py
--- a/moto/kinesis/models.py
+++ b/moto/kinesis/models.py
@@ -1,5 +1,9 @@
+from base64 import b64encode
from collections import OrderedDict
+from gzip import GzipFile
import datetime
+import io
+import json
import re
import itertools
@@ -8,6 +12,7 @@
... |
getmoto__moto-5020 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/_models/transit_gateway_route_tables.py:TransitGatewayRouteTableBackend.search_transit_gateway_routes"
],
"edited_modules": [
"moto/ec2/_models/transit_gateway_route_tables.... | getmoto/moto | f8f6f6f1eeacd3fae37dd98982c6572cd9151fda | Search Transit Gateway Returns Cached Routes
Searching for transit gateway routes seems to cache routes. The first search will work, but subsequent searches only return the first value you searched for.
```
def late_boto_initialization(self):
import boto3
self.mock_client = boto3.client("ec... | diff --git a/moto/ec2/_models/transit_gateway_route_tables.py b/moto/ec2/_models/transit_gateway_route_tables.py
--- a/moto/ec2/_models/transit_gateway_route_tables.py
+++ b/moto/ec2/_models/transit_gateway_route_tables.py
@@ -138,13 +138,20 @@ def delete_transit_gateway_route(
def search_transit_gateway_routes(
... |
getmoto__moto-6006 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/glue/models.py:FakeTable.as_dict"
],
"edited_modules": [
"moto/glue/models.py:FakeTable"
]
},
"file": "moto/glue/models.py"
}
] | getmoto/moto | 0e24b281eb12825706fd9088e8b4cd4e295af443 | [DynamoDb] All Errors are deserialized as DynamoDbException in JAVA SDK
Using MotoServer to test Java based services. This Service creates the DynamoDb table if it doesn't exist, ie, on ResourceNotFoundException, table is created.
When using the MotoServer, We get response
```json
{"__type": "com.amazonaws.dynamod... | diff --git a/moto/glue/models.py b/moto/glue/models.py
--- a/moto/glue/models.py
+++ b/moto/glue/models.py
@@ -840,7 +840,8 @@ def get_version(self, ver):
def delete_version(self, version_id):
self.versions.pop(version_id)
- def as_dict(self, version=1):
+ def as_dict(self, version=None):
+ ... |
getmoto__moto-7324 | [
{
"changes": {
"added_entities": [
"moto/ec2/models/amis.py:AmiBackend.modify_image_attribute"
],
"added_modules": null,
"edited_entities": [
"moto/ec2/models/amis.py:Ami.__init__",
"moto/ec2/models/amis.py:Ami.is_public",
"moto/ec2/models/amis.py:AmiBacke... | getmoto/moto | 9a5f0a065e0cd8e58b6ee11a0134ebf49b5514f5 | When modifying EC2 image attribute to add organization ARN to launch permissions, moto silently ignores it.
**How to reproduce**
```
image = boto3.resource("ec2").Image(ami_id)
arn = "someOrganizationArn"
image.modify_attribute(
Attribute="launchPermission",
OperationType="add",
OrganizationArns=[a... | diff --git a/moto/ec2/models/amis.py b/moto/ec2/models/amis.py
--- a/moto/ec2/models/amis.py
+++ b/moto/ec2/models/amis.py
@@ -101,11 +101,10 @@ def __init__( # pylint: disable=dangerous-default-value
if not description:
self.description = source_ami.description
- self.launch_per... |
getmoto__moto-6208 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ses/template.py:parse_template"
],
"edited_modules": [
"moto/ses/template.py:parse_template"
]
},
"file": "moto/ses/template.py"
}
] | getmoto/moto | 90d67db6eae20ccde57356b694e013fd5864d14a | AssertionError with SES Templates containing {
Reproduction of Issue
run moto_server
Test Template (testTemplate.json):
`{
"Template": {
"TemplateName": "Test",
"SubjectPart": "Test",
"HtmlPart": "This is a { Test } {{test}}",
"TextPart": "This is a { Test } {{test}}"
}
}`
aws ...... | diff --git a/moto/ses/template.py b/moto/ses/template.py
--- a/moto/ses/template.py
+++ b/moto/ses/template.py
@@ -10,7 +10,8 @@ def parse_template(template, template_data, tokenizer=None, until=None):
for char in tokenizer:
if until is not None and (char + tokenizer.peek(len(until) - 1)) == until:
... |
getmoto__moto-5614 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/cloudwatch/models.py:CloudWatchBackend.tag_resource"
],
"edited_modules": [
"moto/cloudwatch/models.py:CloudWatchBackend"
]
},
"file": "moto/cloudwatch/models.py"
... | getmoto/moto | b17a792f1cf3aa96f9b44a5c793793b8577df9f7 | Cloudwatch tag_resource only works if tags already exist
The moto cloudwatch `tag_resource` function only works if tags were added to the alarm when it was created. If they do not exist, then a `ResourceNotFoundException` is raised ([here](https://github.com/spulec/moto/blob/03f551870325fdce1c789bc43c286486cdddb13d/mot... | diff --git a/moto/cloudwatch/models.py b/moto/cloudwatch/models.py
--- a/moto/cloudwatch/models.py
+++ b/moto/cloudwatch/models.py
@@ -665,7 +665,10 @@ def list_tags_for_resource(self, arn):
return self.tagger.get_tag_dict_for_resource(arn)
def tag_resource(self, arn, tags):
- if arn not in self.... |
getmoto__moto-7484 | [
{
"changes": {
"added_entities": [
"moto/dynamodb/models/table.py:Table._item_smaller_than_dct"
],
"added_modules": null,
"edited_entities": [
"moto/dynamodb/models/table.py:Table.query",
"moto/dynamodb/models/table.py:Table.scan",
"moto/dynamodb/models/ta... | getmoto/moto | ca5d514c61d74b7278ad9c3a035d179f54ed0b92 | LastEvaluatedKey not handled when not present in dynamodb table
## The problem
For dynamodb when `client.query` is given a `LastEvaluatedKey` that is not actually in the mocked table it will act as if there are no records after the given `LastEvaluatedKey` even if there are. If the key is present `moto` behaves as e... | diff --git a/moto/dynamodb/models/table.py b/moto/dynamodb/models/table.py
--- a/moto/dynamodb/models/table.py
+++ b/moto/dynamodb/models/table.py
@@ -744,9 +744,10 @@ def conv(x: DynamoType) -> Any:
# Cycle through the previous page of results
# When we encounter our start key, we know we've ... |
getmoto__moto-7567 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/stepfunctions/models.py:StateMachine.start_execution"
],
"edited_modules": [
"moto/stepfunctions/models.py:StateMachine"
]
},
"file": "moto/stepfunctions/models.py... | getmoto/moto | 7289a6c7b11bbbd97e6004ff742eb0af5139950f | Stepfunction describe executions returns a double encoded string
## Issue
When running describe_execution as follows, the result is a string not the expected dictionary
``` python
@mock_aws
def test_a(self):
client = boto3.client("stepfunctions")
sf = client.create_state_machine(
name="name",... | diff --git a/moto/stepfunctions/models.py b/moto/stepfunctions/models.py
--- a/moto/stepfunctions/models.py
+++ b/moto/stepfunctions/models.py
@@ -60,7 +60,7 @@ def start_execution(
state_machine_name=self.name,
execution_name=execution_name,
state_machine_arn=self.arn,
- ... |
getmoto__moto-6049 | [
{
"changes": {
"added_entities": [
"moto/secretsmanager/models.py:SecretsManagerBackend.put_resource_policy",
"moto/secretsmanager/models.py:SecretsManagerBackend.delete_resource_policy"
],
"added_modules": null,
"edited_entities": [
"moto/secretsmanager/models.py... | getmoto/moto | 2c9c7a7a63e7ca0526e433f76902c40801ab02cc | Error creating secret with moto_server
Hello,
I'm using moto_server with command : `moto_server -p4566`.
When I try to create a simple aws secrets with Terraform, I get the following error, with no trace in moto :
```
│ Error: reading Secrets Manager Secret (arn:aws:secretsmanager:<region>:123456789012:secre... | diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py
--- a/moto/secretsmanager/models.py
+++ b/moto/secretsmanager/models.py
@@ -87,6 +87,7 @@ def __init__(
self.rotation_lambda_arn = ""
self.auto_rotate_after_days = 0
self.deleted_date = None
+ self.policy = None... |
getmoto__moto-6144 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/rds/models.py:RDSBackend.describe_db_clusters"
],
"edited_modules": [
"moto/rds/models.py:Cluster",
"moto/rds/models.py:RDSBackend"
]
},
"file": "moto/rds/... | getmoto/moto | e3fe0b0c3944c52071e7c77ac7542e5d4874b768 | RDS's describe_db_clusters Filter argument not supported
RDS's `describe_db_clusters` takes a `Filters` argument to reduce the number of results server side. This argument is silently ignored by moto and all results are returned instead.
Sample test case:
```python
import boto3
import pytest
import sure
from ... | diff --git a/moto/rds/models.py b/moto/rds/models.py
--- a/moto/rds/models.py
+++ b/moto/rds/models.py
@@ -46,6 +46,13 @@
class Cluster:
+ SUPPORTED_FILTERS = {
+ "db-cluster-id": FilterDef(
+ ["db_cluster_arn", "db_cluster_identifier"], "DB Cluster Identifiers"
+ ),
+ "engine": ... |
getmoto__moto-4793 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/s3/models.py:FakeKey.__init__",
"moto/s3/models.py:FakeKey.response_dict",
"moto/s3/models.py:S3Backend.put_object",
"moto/s3/models.py:S3Backend.get_object",
"moto/... | getmoto/moto | 05f5bbc568b3e1b9de402d194b3e93a39b6b2c27 | s3 get_object to return TagCount
# Summary
The `get_object()` function in boto with the real S3 returns `TagCount` if there are any tags on the object.
With moto, `TagCount` is never returned, but should be.
# Steps to reproduce
Try this with `if True` to use moto, and `if False` to not use moto.
```
impo... | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -115,6 +115,7 @@ def __init__(
lock_mode=None,
lock_legal_status=None,
lock_until=None,
+ s3_backend=None,
):
self.name = name
self.last_modified = datetime.date... |
getmoto__moto-6854 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "moto/iam/responses.py"
}
] | getmoto/moto | 178f2b8c03d7bf45ac520b3c03576e6a17494b5c | IAM list_groups method didn't return "CreateDate" field
It is very simple:
based on [iam_client.list_groups() AWS Document](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam/paginator/ListGroups.html), it should returns a field ``CreateDate``.
I think you already implemented this attr... | diff --git a/moto/iam/responses.py b/moto/iam/responses.py
--- a/moto/iam/responses.py
+++ b/moto/iam/responses.py
@@ -1761,6 +1761,7 @@ def get_service_linked_role_deletion_status(self) -> str:
<GroupName>{{ group.name }}</GroupName>
<GroupId>{{ group.id }}</GroupId>
<Arn>{{ grou... |
getmoto__moto-5428 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/logs/models.py:LogStream.filter_log_events"
],
"edited_modules": [
"moto/logs/models.py:LogStream"
]
},
"file": "moto/logs/models.py"
},
{
"changes": {
... | getmoto/moto | 067e00871640dd9574b4466e39044f8198d5bd7e | logs.filter_log_events is only partially implemented
I suspect this is already well known, but mock_logs.filter_log_events is basically unimplemented.
Given the following code:
```
import boto3
import time
from moto import mock_logs
log_group_name = 'stuff'
log_stream_name = 'whatnot'
mock = mock_logs()... | diff --git a/moto/logs/models.py b/moto/logs/models.py
--- a/moto/logs/models.py
+++ b/moto/logs/models.py
@@ -14,7 +14,7 @@
LimitExceededException,
)
from moto.s3.models import s3_backends
-from .utils import PAGINATION_MODEL
+from .utils import PAGINATION_MODEL, EventMessageFilter
MAX_RESOURCE_POLICIES_PER_... |
getmoto__moto-5991 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/kms/models.py:KmsBackend.add_alias"
],
"edited_modules": [
"moto/kms/models.py:KmsBackend"
]
},
"file": "moto/kms/models.py"
},
{
"changes": {
"added... | getmoto/moto | fd66843cf79c7b320af0caa319f6e4ecfd4b142c | KMS ListAliases silently ignores KeyID argument
The KMS `ListAliases` API has an optional `KeyID` parameter. The expected behavior, when this parameter is passed a Key ID or Key ARN argument, is for the output of `ListAliases` to return _only_ the aliases associated with the specified key.
> Lists only aliases that ... | diff --git a/moto/kms/models.py b/moto/kms/models.py
--- a/moto/kms/models.py
+++ b/moto/kms/models.py
@@ -374,7 +374,8 @@ def alias_exists(self, alias_name):
return False
def add_alias(self, target_key_id, alias_name):
- self.key_to_aliases[target_key_id].add(alias_name)
+ raw_key_id = se... |
getmoto__moto-7385 | [
{
"changes": {
"added_entities": [
"moto/ce/models.py:CostExplorerBackend.get_cost_and_usage"
],
"added_modules": null,
"edited_entities": [
"moto/ce/models.py:CostExplorerBackend.__init__"
],
"edited_modules": [
"moto/ce/models.py:CostExplorerBackend"... | getmoto/moto | 6505971ecb0dda833b9828ba71522f2805655674 | Plans on Cost Explorer's get_cost_and_usage
Hello! I am aware Cost Explorer is available now in moto, but only for [certain features](http://docs.getmoto.org/en/latest/docs/services/ce.html?highlight=cost%20explorer#moto.ce.models.CostExplorerBackend).
So, I have a quick question, are there any plans on mocking Cost E... | diff --git a/moto/ce/models.py b/moto/ce/models.py
--- a/moto/ce/models.py
+++ b/moto/ce/models.py
@@ -74,6 +74,8 @@ class CostExplorerBackend(BaseBackend):
def __init__(self, region_name: str, account_id: str):
super().__init__(region_name, account_id)
self.cost_categories: Dict[str, CostCategor... |
getmoto__moto-7211 | [
{
"changes": {
"added_entities": [
"moto/sagemakerruntime/models.py:SageMakerRuntimeBackend.invoke_endpoint_async"
],
"added_modules": null,
"edited_entities": [
"moto/sagemakerruntime/models.py:SageMakerRuntimeBackend.__init__"
],
"edited_modules": [
... | getmoto/moto | 455fbd5eaa0270e03eac85a532e47ec75c7acd21 | [Enhancement] Add support for `invoke_endpoint_async` in `sagemaker-runtime`
Hi Moto team,
Thanks so much for this great library! I saw recently that you all shipped support for `sagemaker-runtime`'s `invoke_endpoint` method (https://github.com/getmoto/moto/issues/4180 and https://github.com/getmoto/moto/pull/6747).... | diff --git a/moto/sagemakerruntime/models.py b/moto/sagemakerruntime/models.py
--- a/moto/sagemakerruntime/models.py
+++ b/moto/sagemakerruntime/models.py
@@ -1,6 +1,8 @@
+import json
from typing import Dict, List, Tuple
from moto.core import BackendDict, BaseBackend
+from moto.moto_api._internal import mock_random... |
getmoto__moto-6509 | [
{
"changes": {
"added_entities": [
"moto/iotdata/responses.py:IoTDataPlaneResponse.setup_class"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"moto/iotdata/responses.py:IoTDataPlaneResponse"
]
},
"file": "moto/iotdata/responses... | getmoto/moto | 1b2dfbaf569d21c5a3a1c35592325b09b3c697f4 | iot_data publish raises UnicodeDecodeError for binary payloads
I am writing a function that publishes protobuf using the `publish` function in iot data. I am trying to test that function using moto. However, when the mock client calls `publish` is raises a `UnicodeDecodeError`. See below for stacktrace.
# Minimal ex... | diff --git a/moto/iotdata/responses.py b/moto/iotdata/responses.py
--- a/moto/iotdata/responses.py
+++ b/moto/iotdata/responses.py
@@ -1,6 +1,7 @@
from moto.core.responses import BaseResponse
from .models import iotdata_backends, IoTDataPlaneBackend
import json
+from typing import Any
from urllib.parse import unquo... |
getmoto__moto-6953 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/sns/exceptions.py:DuplicateSnsEndpointError.__init__"
],
"edited_modules": [
"moto/sns/exceptions.py:DuplicateSnsEndpointError"
]
},
"file": "moto/sns/exceptions.p... | getmoto/moto | 9c0724e0d07ff79a0e807d2cbc28a506063dcd13 | Error handling for SNS mobile push does not match AWS
Currently, the Moto SNS mock raises an error with code `DuplicateEndpoint` when attempting to create a second platform endpoint using the same token.
This is not actually the behavior on AWS. On AWS, when attempting to do this, when not setting `CustomUserData`, ... | diff --git a/moto/sns/exceptions.py b/moto/sns/exceptions.py
--- a/moto/sns/exceptions.py
+++ b/moto/sns/exceptions.py
@@ -31,7 +31,7 @@ class DuplicateSnsEndpointError(SNSException):
code = 400
def __init__(self, message: str):
- super().__init__("DuplicateEndpoint", message)
+ super().__init... |
getmoto__moto-6924 | [
{
"changes": {
"added_entities": [
"moto/ecr/models.py:ECRBackend.batch_get_repository_scanning_configuration",
"moto/ecr/models.py:ECRBackend.put_registry_scanning_configuration"
],
"added_modules": null,
"edited_entities": [
"moto/ecr/models.py:Repository.__init... | getmoto/moto | 069218e1f35b9cea972bb29a5ebb5dc48bdf3d1f | Full ECR coverage
Is full coverage of ECR planned?
As of now mocking any workflow that involves docker push to an ECR private repository is not supported.
| diff --git a/moto/ecr/models.py b/moto/ecr/models.py
--- a/moto/ecr/models.py
+++ b/moto/ecr/models.py
@@ -3,7 +3,7 @@
import re
from collections import namedtuple
from datetime import datetime, timezone
-from typing import Any, Dict, List, Iterable, Optional
+from typing import Any, Dict, List, Iterable, Optional, ... |
getmoto__moto-7361 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/apigateway/models.py:UsagePlan.apply_patch_operations"
],
"edited_modules": [
"moto/apigateway/models.py:UsagePlan"
]
},
"file": "moto/apigateway/models.py"
}
] | getmoto/moto | b9622875f5734088dbe213add3b06b19425b2f1b | Feature Request: Support apigateway patchOperations for 'path': '/apiStages'
When calling `client.update_usage_plan(usagePlanId=usage_plan_id, patchOperations=[{
'op': 'add',
'path': '/apiStages',
'value': f'{api_gw_id}:{api_gw_stage}',}])`
The api-gw should be attached to the usage plan but... | diff --git a/moto/apigateway/models.py b/moto/apigateway/models.py
--- a/moto/apigateway/models.py
+++ b/moto/apigateway/models.py
@@ -874,21 +874,29 @@ def apply_patch_operations(self, patch_operations: List[Dict[str, Any]]) -> None
for op in patch_operations:
path = op["path"]
value... |
getmoto__moto-4799 | [
{
"changes": {
"added_entities": [
"moto/core/models.py:get_direct_methods_of"
],
"added_modules": [
"moto/core/models.py:get_direct_methods_of"
],
"edited_entities": [
"moto/core/models.py:BaseMockAWS.decorate_class"
],
"edited_modules": [
... | getmoto/moto | fc1ef55adc7e0c886602149cfe9c1dc04645952b | "Bucket does not exist" thrown from inherited tearDown method in moto 3.0.1
I have this code:
```python
import unittest
import boto3
from moto import mock_s3
@mock_s3
class BaseTest(unittest.TestCase):
def setUp(self) -> None:
self.s3 = boto3.resource('s3')
self.test_bucket = self.s... | diff --git a/moto/core/models.py b/moto/core/models.py
--- a/moto/core/models.py
+++ b/moto/core/models.py
@@ -127,16 +127,21 @@ def wrapper(*args, **kwargs):
return wrapper
def decorate_class(self, klass):
- direct_methods = set(
- x
- for x, y in klass.__dict__.items()
- ... |
getmoto__moto-5012 | [
{
"changes": {
"added_entities": [
"moto/dynamodb/exceptions.py:ResourceNotFoundException.__init__",
"moto/dynamodb/exceptions.py:TableNotFoundException.__init__",
"moto/dynamodb/exceptions.py:SourceTableNotFoundException.__init__",
"moto/dynamodb/exceptions.py:BackupNotFou... | getmoto/moto | a0eb48d588d8a5b18b1ffd9fa6c48615505e3c1d | DynamoDB - Provide full cancellation reasons for write_transactions failue
When using boto3 and `write_transactions`, if the transaction fails we normally get an error response that includes the full cancellation reasons:
```
"CancellationReasons": [
{
"Code": "None"
},
... | diff --git a/moto/dynamodb/exceptions.py b/moto/dynamodb/exceptions.py
--- a/moto/dynamodb/exceptions.py
+++ b/moto/dynamodb/exceptions.py
@@ -1,15 +1,24 @@
+import json
+from moto.core.exceptions import JsonRESTError
from moto.dynamodb.limits import HASH_KEY_MAX_LENGTH, RANGE_KEY_MAX_LENGTH
-class InvalidIndexNam... |
getmoto__moto-5216 | [
{
"changes": {
"added_entities": [
"moto/ec2/exceptions.py:EmptyTagSpecError.__init__"
],
"added_modules": [
"moto/ec2/exceptions.py:EmptyTagSpecError"
],
"edited_entities": null,
"edited_modules": null
},
"file": "moto/ec2/exceptions.py"
},
{
... | getmoto/moto | 67cda6d7d6f42118ccd7e2170e7ff0a1f92fa6a6 | [Ec2 Tags] ResourceType input removed from Tags and expected later on to be present
In file moto/ec2/responses/_base_response.py, method _parse_tag_specification converts the provided tags from:
```
[{"ResourceType": _type, "Tag": [{"Key": k, "Value": v}, ..]}]
```
To:
```
{_type: {k: v, ..}}
```
The same "_par... | diff --git a/moto/ec2/exceptions.py b/moto/ec2/exceptions.py
--- a/moto/ec2/exceptions.py
+++ b/moto/ec2/exceptions.py
@@ -461,6 +461,13 @@ def __init__(self, parameter_value):
)
+class EmptyTagSpecError(EC2ClientError):
+ def __init__(self):
+ super().__init__(
+ "InvalidParameterValu... |
getmoto__moto-4853 | [
{
"changes": {
"added_entities": [
"moto/ec2/exceptions.py:InvalidRequest.__init__"
],
"added_modules": [
"moto/ec2/exceptions.py:InvalidRequest"
],
"edited_entities": null,
"edited_modules": null
},
"file": "moto/ec2/exceptions.py"
},
{
"chang... | getmoto/moto | 2ec1a0477888d5dcc4f2cde95bc6c9502f7762d6 | EC2 run_instances BlockDeviceMapping missing support for NoDevice
In [FireSim](https://fires.im/) we use an AMI that by default has two volumes. We only need one of them and thus make use of the `NoDevice` property of [`BlockDeviceMapping`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_BlockDeviceMapping.... | diff --git a/moto/ec2/exceptions.py b/moto/ec2/exceptions.py
--- a/moto/ec2/exceptions.py
+++ b/moto/ec2/exceptions.py
@@ -49,6 +49,11 @@ def __init__(self, dhcp_options_id):
)
+class InvalidRequest(EC2ClientError):
+ def __init__(self):
+ super().__init__("InvalidRequest", "The request received ... |
getmoto__moto-5321 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/rds/models.py:RDSBackend.describe_db_clusters"
],
"edited_modules": [
"moto/rds/models.py:RDSBackend"
]
},
"file": "moto/rds/models.py"
}
] | getmoto/moto | 036cc6879e81341a16c3574faf7b64e4e14e29be | KeyError: 'clustername' (instead of `DBClusterNotFoundFault`) thrown when calling `describe_db_clusters` for a non-existent cluster
## Moto version:
`3.1.16`
## Repro steps
```python
import boto3
from moto import mock_rds
@mock_rds
def test_bug():
session = boto3.session.Session()
rds = session.cl... | diff --git a/moto/rds/models.py b/moto/rds/models.py
--- a/moto/rds/models.py
+++ b/moto/rds/models.py
@@ -1796,6 +1796,8 @@ def delete_db_cluster_snapshot(self, db_snapshot_identifier):
def describe_db_clusters(self, cluster_identifier):
if cluster_identifier:
+ if cluster_identifier not in ... |
getmoto__moto-6299 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/cloudformation/models.py:FakeStackInstances.delete"
],
"edited_modules": [
"moto/cloudformation/models.py:FakeStackInstances"
]
},
"file": "moto/cloudformation/mod... | getmoto/moto | fae7ee76b34980eea9e37e1a5fc1d52651f5a8eb | Cloud Formation delete_stack_instances implementation does not remove all instances when multiple regions are specified.
## Reporting Bugs
Cloud Formation delete_stack_instances implementation does not remove all instances when multiple regions are specified.
I am writing a test with the following steps:
- cr... | diff --git a/moto/cloudformation/models.py b/moto/cloudformation/models.py
--- a/moto/cloudformation/models.py
+++ b/moto/cloudformation/models.py
@@ -346,10 +346,14 @@ def update(
instance.parameters = parameters or []
def delete(self, accounts: List[str], regions: List[str]) -> None:
- ... |
getmoto__moto-6864 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/glue/models.py:GlueBackend.create_database",
"moto/glue/models.py:GlueBackend.create_table",
"moto/glue/models.py:FakeDatabase.__init__",
"moto/glue/models.py:FakeDatabase.a... | getmoto/moto | 438b2b7843b4b69d25c43d140b2603366a9e6453 | gluet.get_tables() method should return catalog id, which is the 123456789012, the fake AWS Account Id
Based on [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue/client/get_tables.html) document, ``glue.get_tables()`` should return ``{"Name": "table_name", "DatabaseName": "database... | diff --git a/moto/glue/models.py b/moto/glue/models.py
--- a/moto/glue/models.py
+++ b/moto/glue/models.py
@@ -131,7 +131,9 @@ def create_database(
if database_name in self.databases:
raise DatabaseAlreadyExistsException()
- database = FakeDatabase(database_name, database_input)
+ ... |
getmoto__moto-5835 | [
{
"changes": {
"added_entities": [
"moto/ssm/models.py:_valid_parameter_type"
],
"added_modules": [
"moto/ssm/models.py:_valid_parameter_type"
],
"edited_entities": [
"moto/ssm/models.py:SimpleSystemManagerBackend.put_parameter"
],
"edited_module... | getmoto/moto | 6da12892a3c18248a2cfe55bc7d2cb3039817684 | Type not validated with SSM put_parameter
# Steps to reproduce
```
import boto3
from moto import mock_ssm
with mock_ssm():
client=boto3.client('ssm')
param_name = 'test_param'
client.put_parameter(
Name=param_name,
Value="Contents of param",
Type='str' # this is a bug ... | diff --git a/moto/ssm/models.py b/moto/ssm/models.py
--- a/moto/ssm/models.py
+++ b/moto/ssm/models.py
@@ -851,6 +851,14 @@ def _document_filter_match(account_id, filters, ssm_doc):
return True
+def _valid_parameter_type(type_):
+ """
+ Parameter Type field only allows `SecureString`, `StringList` and `S... |
getmoto__moto-5562 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/s3/models.py:S3Backend.list_object_versions"
],
"edited_modules": [
"moto/s3/models.py:S3Backend"
]
},
"file": "moto/s3/models.py"
}
] | getmoto/moto | 121e3eadb821955c74b5ab61b8cfbef7328e7592 | Problem with list_object_versions
I'm having some trouble using the function `list_object_versions` using the mock of S3. I create a versioned bucket, put an object and its created with the version id, what is expected, but when I try to list the versions, the dict returned by the `list_object_versions` does not come w... | diff --git a/moto/s3/models.py b/moto/s3/models.py
--- a/moto/s3/models.py
+++ b/moto/s3/models.py
@@ -1601,10 +1601,12 @@ def list_object_versions(
# Filter for keys that start with prefix
if not name.startswith(prefix):
continue
- # separate out all keys that cont... |
getmoto__moto-5515 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"moto/ec2/models/availability_zones_and_regions.py:RegionsAndZonesBackend"
]
},
"file": "moto/ec2/models/availability_zones_and_regions.py"
},
{
"chang... | getmoto/moto | 37c5be725aef7b554a12cd53f249b2ed8a8b679f | Inconsistent `us-west-1` availability zones
`us-west-1` only has [2 availability zones accessible to customers](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/). The [mapping of availability zone name to availability zone ID](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html) ... | diff --git a/moto/ec2/models/availability_zones_and_regions.py b/moto/ec2/models/availability_zones_and_regions.py
--- a/moto/ec2/models/availability_zones_and_regions.py
+++ b/moto/ec2/models/availability_zones_and_regions.py
@@ -238,8 +238,8 @@ class RegionsAndZonesBackend:
Zone(region_name="us-east-2", ... |
getmoto__moto-6190 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/s3/responses.py:S3Response._bucket_response_put"
],
"edited_modules": [
"moto/s3/responses.py:S3Response"
]
},
"file": "moto/s3/responses.py"
}
] | getmoto/moto | 1eb3479d084836b851b498f022a335db21abf91a | S3 CreateBucket raising 411 when no Content-Length header is set
Hello,
It seems moto will raise a 411 Exception when calling the `CreateBucket` operation with no `content-length` header, even when there is no body while targeting `us-east-1` (so no `CreateBucketConfiguration` with `LocationConstraint`). It seems it... | diff --git a/moto/s3/responses.py b/moto/s3/responses.py
--- a/moto/s3/responses.py
+++ b/moto/s3/responses.py
@@ -740,7 +740,7 @@ def _parse_pab_config(self):
return parsed_xml
def _bucket_response_put(self, request, region_name, bucket_name, querystring):
- if not request.headers.get("Content-L... |
getmoto__moto-6238 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ssm/models.py:SimpleSystemManagerBackend._validate_parameter_filters",
"moto/ssm/models.py:SimpleSystemManagerBackend._match_filters"
],
"edited_modules": [
"moto/ssm/mo... | getmoto/moto | c2e3d90fc96d3b47130a136c5f20806043922257 | SSM `describe_parameters` `ParameterFilters` fails when `Values` is not provided
Hi,
I'm using Moto to mock the SSM client and am running into an error. One of my filters does not have a value which causes Moto to throw an error, but the real code works fine.
With this code:
```py
paginator = ssm.get_paginat... | diff --git a/moto/ssm/models.py b/moto/ssm/models.py
--- a/moto/ssm/models.py
+++ b/moto/ssm/models.py
@@ -1434,7 +1434,7 @@ def _validate_parameter_filters(self, parameter_filters, by_path):
f"The following filter key is not valid: {key}. Valid filter keys include: [Type, KeyId]."
... |
getmoto__moto-7167 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/cognitoidp/models.py:CognitoResourceServer.to_json"
],
"edited_modules": [
"moto/cognitoidp/models.py:CognitoResourceServer"
]
},
"file": "moto/cognitoidp/models.p... | getmoto/moto | e5f962193cb12e696bd6ec641844c4d09b5fb87c | Cognito IDP/ create-resource-server: TypeError if no scopes are provided
If I try to create a ressource servers without scope Moto is crashing with the following error :
```python
self = <moto.cognitoidp.models.CognitoResourceServer object at 0x1096a4750>
def to_json(self) -> Dict[str, Any]:
res: D... | diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py
--- a/moto/cognitoidp/models.py
+++ b/moto/cognitoidp/models.py
@@ -909,7 +909,7 @@ def to_json(self) -> Dict[str, Any]:
"Name": self.name,
}
- if len(self.scopes) != 0:
+ if self.scopes:
res.update({"S... |
getmoto__moto-5117 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/secretsmanager/models.py:SecretsManagerBackend.get_secret_value",
"moto/secretsmanager/models.py:SecretsManagerBackend.describe_secret"
],
"edited_modules": [
"moto/secr... | getmoto/moto | ac03044c9620f1d3fcfcd02ef35028c147a29541 | Implement SecretsManager integration for Parameter store.
Currently `moto` doesn't implement the SecretsManager to SSM integration while also restricting the `/aws` path prefix for `ssm.put_parameter()`. This means there is no way to mock this behaviour.
Docs for the integration: https://docs.aws.amazon.com/systems-... | diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py
--- a/moto/secretsmanager/models.py
+++ b/moto/secretsmanager/models.py
@@ -281,9 +281,7 @@ def get_secret_value(self, secret_id, version_id, version_stage):
):
raise SecretHasNoValueException(version_stage or "AWSCURRENT")... |
getmoto__moto-5870 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"moto/batch/responses.py:BatchResponse"
]
},
"file": "moto/batch/responses.py"
}
] | getmoto/moto | b0ee64f24a95286f8466d2a4b54a9df85ec29073 | Getting a KeyError('RequestId') while trying to use mock_batch in moto
Hi, I am getting a `KeyError('RequestId'))` when i am trying to use `mock_batch` functionality of moto.
Code:
```
@mock_iam
@mock_batch
def test_aws_batch(self):
client = boto3.client('batch')
iam = boto3.client('iam')
#moc... | diff --git a/moto/batch/responses.py b/moto/batch/responses.py
--- a/moto/batch/responses.py
+++ b/moto/batch/responses.py
@@ -1,4 +1,5 @@
from moto.core.responses import BaseResponse
+from moto.utilities.aws_headers import amzn_request_id
from .models import batch_backends, BatchBackend
from urllib.parse import url... |
getmoto__moto-5999 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/resourcegroupstaggingapi/models.py:ResourceGroupsTaggingAPIBackend._get_resources_generator"
],
"edited_modules": [
"moto/resourcegroupstaggingapi/models.py:ResourceGroupsTaggin... | getmoto/moto | 8eaa9fa3700345ceb16084178c78247fc1512dfc | Add ResourceGroupsTaggingAPI Support for Aurora clusters
Currently moto seems to not support rds:cluster and only supports rds:db . This issues is to ask to add support to fetch the rds aurora clusters using ResourceGroupsTaggingAPI
| diff --git a/moto/resourcegroupstaggingapi/models.py b/moto/resourcegroupstaggingapi/models.py
--- a/moto/resourcegroupstaggingapi/models.py
+++ b/moto/resourcegroupstaggingapi/models.py
@@ -326,6 +326,21 @@ def get_kms_tags(kms_key_id):
yield {"ResourceARN": f"{kms_key.arn}", "Tags": tags}
+ ... |
getmoto__moto-5420 | [
{
"changes": {
"added_entities": [
"moto/awslambda/exceptions.py:FunctionUrlConfigNotFound.__init__"
],
"added_modules": [
"moto/awslambda/exceptions.py:FunctionUrlConfigNotFound"
],
"edited_entities": null,
"edited_modules": null
},
"file": "moto/awsl... | getmoto/moto | 3e6394e641f29110ed29deb2e9806e2f9cb7106f | AWSLambda create_function_url_config unsupported
## boto3 function url capabilities are unsupported
AWS added function url as a new feature called function url. I am trying to test some features around this. I'm getting a client error when calling the create_function_url_config method
This is something that needs... | diff --git a/moto/awslambda/exceptions.py b/moto/awslambda/exceptions.py
--- a/moto/awslambda/exceptions.py
+++ b/moto/awslambda/exceptions.py
@@ -49,6 +49,15 @@ def __init__(self, arn):
super().__init__("ResourceNotFoundException", f"Function not found: {arn}")
+class FunctionUrlConfigNotFound(LambdaClien... |
getmoto__moto-6041 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/responses/security_groups.py:SecurityGroups.describe_security_group_rules"
],
"edited_modules": [
"moto/ec2/responses/security_groups.py:SecurityGroups"
]
},
"... | getmoto/moto | 84174e129d5a0182282a5f8719426d16cddb019b | ec2.describe_security_group_rules does not use filter
## how to reproduce the issue
```
import boto3
from botocore.config import Config
from moto import mock_ec2
with mock_ec2():
config = Config(
region_name="eu-west-1"
)
client = boto3.client("ec2", config=config)
# Cr... | diff --git a/moto/ec2/responses/security_groups.py b/moto/ec2/responses/security_groups.py
--- a/moto/ec2/responses/security_groups.py
+++ b/moto/ec2/responses/security_groups.py
@@ -194,7 +194,7 @@ def describe_security_groups(self) -> str:
def describe_security_group_rules(self) -> str:
group_id = sel... |
getmoto__moto-7495 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "moto/ec2/responses/instances.py"
}
] | getmoto/moto | 009d0191f9591c4d4b44c3b94f54bb69bb3c05b2 | StateTransitionReason has no value after stopping an instance
Hi All,
I am struggling with getting moto 5.0.3 test run correctly. I have a code that reads StateTransitionReason date and makes calculations to find the difference. However, after stopping instance with moto:
```
reservation = ec2.create_instanc... | diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py
--- a/moto/ec2/responses/instances.py
+++ b/moto/ec2/responses/instances.py
@@ -463,7 +463,7 @@ def _convert_to_bool(bool_str: Any) -> bool: # type: ignore[misc]
<privateDnsName>{{ instance.private_dns }}</privateDnsName>
... |
getmoto__moto-5338 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "moto/ec2/utils.py"
}
] | getmoto/moto | 515faca8aa00dcba2a3a2285ea089d71509a86e5 | NotImplementedError: Filter dicts have not been implemented in Moto for 'key-name'
I am seeing this when I try to use the `describe_instances` ec2 function and filter on `key-name`.
Quick snippet of code that produces the error:
```
import boto3
import moto
mock_aws_account = moto.mock_ec2()
mock_aws_accoun... | diff --git a/moto/ec2/utils.py b/moto/ec2/utils.py
--- a/moto/ec2/utils.py
+++ b/moto/ec2/utils.py
@@ -413,6 +413,7 @@ def tag_filter_matches(obj, filter_name, filter_values):
"owner-id": "owner_id",
"subnet-id": "subnet_id",
"dns-name": "public_dns",
+ "key-name": "key_name",
}
|
getmoto__moto-6387 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/cloudfront/responses.py:CloudFrontResponse._get_xml_body"
],
"edited_modules": [
"moto/cloudfront/responses.py:CloudFrontResponse"
]
},
"file": "moto/cloudfront/re... | getmoto/moto | 7b4cd492ffa6768dfbd733b3ca5f55548d308d00 | CloudFront: Bogus response from create_invalidation API when supplying a single path.
I'm testing that a Lambda will invalidate the cache of a particular object in CloudFront. There is an issue when creating an invalidation with only one item in the `Paths` parameter.
## Traceback
No runtime errors thrown.
## Ho... | diff --git a/moto/cloudfront/responses.py b/moto/cloudfront/responses.py
--- a/moto/cloudfront/responses.py
+++ b/moto/cloudfront/responses.py
@@ -14,7 +14,7 @@ def __init__(self) -> None:
super().__init__(service_name="cloudfront")
def _get_xml_body(self) -> Dict[str, Any]:
- return xmltodict.pa... |
getmoto__moto-6724 | [
{
"changes": {
"added_entities": [
"moto/logs/models.py:LogStream._send_log_events",
"moto/logs/models.py:SubscriptionFilter.__init__",
"moto/logs/models.py:SubscriptionFilter.update",
"moto/logs/models.py:SubscriptionFilter.to_json"
],
"added_modules": [
... | getmoto/moto | b6a582e6244f705c4e3234b25d86e09c2d1d0100 | logs: Cannot add a second subscription filter
## Description
According to the [cloudwatch logs documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/cloudwatch_limits_cwl.html), we should be able to add 2 subscription filters per log group.
Currently, when I try to write a test to add a second one... | diff --git a/moto/logs/models.py b/moto/logs/models.py
--- a/moto/logs/models.py
+++ b/moto/logs/models.py
@@ -1,5 +1,5 @@
from datetime import datetime, timedelta
-from typing import Any, Dict, List, Tuple, Optional
+from typing import Any, Dict, Iterable, List, Tuple, Optional
from moto.core import BaseBackend, Bac... |
getmoto__moto-4977 | [
{
"changes": {
"added_entities": [
"moto/ecs/models.py:CapacityProvider.__init__",
"moto/ecs/models.py:CapacityProviderFailure.__init__",
"moto/ecs/models.py:CapacityProviderFailure.response_object",
"moto/ecs/models.py:EC2ContainerServiceBackend.create_capacity_provider",
... | getmoto/moto | 4e106995af6f2820273528fca8a4e9ee288690a5 | create_capacity_provider for ECS
Hi there. I was just wondering if you'll be adding support for `create_capacity_provider`?
Thank you.
| diff --git a/moto/ecs/models.py b/moto/ecs/models.py
--- a/moto/ecs/models.py
+++ b/moto/ecs/models.py
@@ -61,7 +61,7 @@ def __init__(self, name, value):
class Cluster(BaseObject, CloudFormationModel):
- def __init__(self, cluster_name, region_name):
+ def __init__(self, cluster_name, region_name, cluster_se... |
getmoto__moto-7335 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"moto/core/responses.py:ActionAuthenticatorMixin"
]
},
"file": "moto/core/responses.py"
}
] | getmoto/moto | a5a2c22fc8757d956216628371e4b072122d423c | Call `GetId` on Cognito Identity when Access Control is available
Authorization may not be included in some Cognito operations.
Not including Authorization results in an error when Access control is enabled.
moto server version: 4.2.14
stack trace.
```
Error on request:
Traceback (most recent call last):
F... | diff --git a/moto/core/responses.py b/moto/core/responses.py
--- a/moto/core/responses.py
+++ b/moto/core/responses.py
@@ -144,6 +144,8 @@ class ActionAuthenticatorMixin(object):
request_count: ClassVar[int] = 0
PUBLIC_OPERATIONS = [
+ "AWSCognitoIdentityService.GetId",
+ "AWSCognitoIdentitySe... |
getmoto__moto-7608 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/stepfunctions/models.py:StepFunctionBackend.send_task_failure"
],
"edited_modules": [
"moto/stepfunctions/models.py:StepFunctionBackend"
]
},
"file": "moto/stepfun... | getmoto/moto | 62e44dbd336227c87ef0eca0bbcb64f29f203300 | Cryptic error when using start_execution with Moto 5.0.5
## Reporting Bugs
Moto version: 5.0.5
Issue: Currently can not test `send_task_success` or `send_task_failure` with Moto 5.0.4+ yet due to the state machine doesn't run properly with `waitForTaskToken` integration type.
Running following test snippet:
... | diff --git a/moto/stepfunctions/models.py b/moto/stepfunctions/models.py
--- a/moto/stepfunctions/models.py
+++ b/moto/stepfunctions/models.py
@@ -638,7 +638,7 @@ def untag_resource(self, resource_arn: str, tag_keys: List[str]) -> None:
except StateMachineDoesNotExist:
raise ResourceNotFound(resou... |
getmoto__moto-5136 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"moto/ec2/models/subnets.py:Subnet.__init__"
],
"edited_modules": [
"moto/ec2/models/subnets.py:Subnet"
]
},
"file": "moto/ec2/models/subnets.py"
},
{
"changes":... | getmoto/moto | 30c2aeab29c1a51805f0bed4a7c8df5b4d2f11af | Moto missing new EC2 Subnet attribute "Ipv6Native"
The EC2 Subnet data model was updated to support the launch of IPv6-only subnets as seen in the `Response Syntax` here: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.describe_subnets
As part of this release a new attr... | diff --git a/moto/ec2/models/subnets.py b/moto/ec2/models/subnets.py
--- a/moto/ec2/models/subnets.py
+++ b/moto/ec2/models/subnets.py
@@ -59,6 +59,9 @@ def __init__(
self._subnet_ips = {} # has IP: instance
self.state = "available"
+ # Placeholder for response templates until Ipv6 support i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.