Commit Graph

5534 Commits

Author SHA1 Message Date
Bert Blommers
8d3cc3ef32 #3359 - Reuse Docker-on-request for AWSLambda and Batch 2020-11-08 15:16:53 +00:00
Bert Blommers
390a4d5510 #3359 - Only initiate Docker when invoking Lambdas 2020-11-08 14:18:49 +00:00
Bert Blommers
c0700aa704 Revert "#3359 - Downgrade Docker-version to not break mock_lambda without Docker running"
This reverts commit 204fdabcc9.
2020-11-08 14:16:02 +00:00
Bert Blommers
204fdabcc9 #3359 - Downgrade Docker-version to not break mock_lambda without Docker running 2020-11-08 13:49:27 +00:00
Brian Pandola
76265576ac
Fix: describe/list attribute discrepancy in Secrets Manager (#3432)
`secretsmanager:DescribeSecret` returns `VersionIdsToStages`
`secretsmanager:ListSecrets` returns the same information in `SecretVersionsToStages`

* Verified fix against real AWS backend.

Fixes #3406
2020-11-03 14:18:56 +00:00
Brian Pandola
f584e16ab9
Fix: eventName for a deleted record should be REMOVE instead of DELETE (#3431)
Verified API documentation[1] against the real AWS backend.

[1]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_Record.html#DDB-Type-streams_Record-eventName

Fixes #3400
2020-11-02 17:21:09 +00:00
usmangani1
f57a77451c
Fix:Added Tags for Network-ACL,RouteTable,InternetGateway (#3430)
* Fix:Added Tags for Network-ACL,RouteTable,InternetGateway

* Modified internet-gateway tags

* Lint

Co-authored-by: usmankb <usman@krazybee.com>
2020-11-02 13:30:02 +00:00
Brian Pandola
171130fe7b
Add support for CloudFormation resource AWS::StepFunctions::StateMachine (#3429)
Closes #3402

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
2020-11-02 11:53:03 +00:00
usmangani1
53c3eb6240
Fix:SecretsManager :Error on Invalid secretID (#3413)
* Fix:SecretsManager :Error on Invalid secretID

* Fixed tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-11-02 10:15:40 +00:00
usmangani1
9970be2309
Fix: Adding alarm arn to describe alarms response (#3409)
* Fix: adding alarm arn to describe alarms response

* Fix:Delete subscriptions on delete topic

* modified tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-11-02 08:56:18 +00:00
Brian Pandola
68e3d394ab
Stepfunctions improvements (#3427)
* Implement filtering for stepfunctions:ListExecutions

* Add pagination to Step Functions endpoints

Implements a generalized approach to pagination via a decorator method for the
Step Functions endpoints.  Modeled on the real AWS backend behavior, `nextToken`
is a dictionary of pagination information encoded in an opaque string.

With just a bit of metadata hard-coded (`utils.PAGINATION_MODEL`), backend `list`
methods need only be decorated with `@paginate` and ensure that their returned
entities are sorted to get full pagination support without any duplicated code
polluting the model.

Closes #3137
2020-11-01 10:16:41 +00:00
Eoin Shanaghy
a3880c4c35
Metric data query alarms (#3419)
* Add support for metric data query alarms (Metrics=[..])

* Fix trailing whitespace

* Allow for unordered metrics in Python 2.7

* Add describe_alarm assertions and support DatapointsToAlarm
2020-10-31 15:56:24 +00:00
jweite
f8d2ce2e6a
Notebook Lifecycle Config create, describe and delete (#3417)
* Notebook Lifecycle Config create, describe and delete

* PR3417 comment changes: raise on create with duplicate name, derive a ValidationException class and use it instead of RESTException, unit test for delete non-existing.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-10-30 21:05:06 +00:00
jweite
cbd4efb42d
ApplicationAutoscaling: support autoscaling policies, deregister_scalable_target (#3350)
* ApplicationAutoscaling: support autoscaling policies, deregister_scalable_target.

* PR3350 comment changes: drop unnecessary pass statements, unit test three exception cases.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-10-30 15:21:34 +00:00
Erinna Chen
d499d4d179
Fix update for application autoscaling register target (#3423) 2020-10-29 14:18:38 +00:00
Brian Pandola
2f23f6b26b
Fix dynamodb:TransactGetItems response for items that do not exist (#3420)
If the requested item has no projected attributes, the corresponding ItemResponse
object is an empty Map.[1]  Verified against real AWS.

Fix existing general test case and add an explicit test case to cover this scenario.

[1]: https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_TransactGetItems.html#API_TransactGetItems_ResponseElements

Fixes #3404
2020-10-29 11:50:45 +00:00
usmangani1
19fc76f466
Fix: SNS Delete subscriptions on topic deletion (#3410)
* Fix:Delete subscriptions on delete topic

* Changed tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-10-29 08:52:02 +00:00
Steve Pulec
795ccd0e2b
Merge pull request #3421 from bblommers/bugfixes-s3-error-response
S3 - Add more detail to error responses
2020-10-28 20:20:09 -05:00
Bert Blommers
cc27f1ef0c S3 - Add more detail to error responses 2020-10-28 14:22:18 +00:00
Neal Granger
a5fc14b5bc
Add missing Fn::GetAtt attributes to S3 bucket mock (#3396)
* Add missing `Fn::GetAtt` attributes to S3 bucket mock

Addresses an issue reported here https://github.com/localstack/aws-cdk-local/issues/1

* Reformat touched files with `black`

* Reformat touched files with `black` on Python 3.7
2020-10-27 16:04:32 +00:00
Artem
53cc3dd67a
Fix SQS md5 attribute hashing. (#3403)
* Fix sqs md5 attribute hashing.

* Fix test name.

* Fix format.
2020-10-27 12:13:47 +00:00
Brian Pandola
c0a25bbd9a
Fix: VpnGatewayId parameter casing in ec2:CreateVpnConnection request (#3401)
Fixes #3397
2020-10-27 07:41:01 +00:00
Steve Pulec
403b06d9c5
Merge pull request #3412 from bblommers/bugfix/3411
CF - Allow multiple cfn-lint API versions
2020-10-26 19:25:17 -05:00
Bert Blommers
b3ae6a0f12 #3411 - CF - Allow multiple cfn-lint API versions 2020-10-24 11:16:30 +01:00
usmangani1
14980371d7
FIX:Add secrets Manager Tag resource Funtionality (#3392)
* FIX:Add secrets Manager Tag resoruce Funtionality

* Fixed review comments

Co-authored-by: usmankb <usman@krazybee.com>
2020-10-22 11:14:32 +01:00
Brian Pandola
9eb58eea41
Fix: nextToken value in logs:DescribeLogGroups response (#3398)
The pagination for this endpoint has been modified to more closely
model the real AWS behavior:
* Log Groups are now sorted alphabetically by `logGroupName`.
* `nextToken` is now a string containing the last `logGroupName` in the
  current response.
* Specifying an invalid `nextToken` does not generate an error, but does
  return an empty group list.
* `nextToken` is not included in the response if there are no additional
  items to return.

Fixes #3395
2020-10-21 09:47:09 +01:00
usmangani1
fcc85a9645
Including Message attributes when ALL is passed (#3393)
* Including Message attributes when ALL is passes

* Added tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-10-19 09:04:38 +01:00
davidaah
2fe3aee359
Allow creation of subnets from secondary VPC IPv4 CIDR blocks (#3391)
* allow subnets to be created from secondary vpc cidr block

* add additional test case for invalid cidr
2020-10-16 16:02:01 +01:00
Brian Pandola
28c1690fc2
Add Support for SNS Topic KmsMasterKeyId Attribute (#3389)
We do not do any validation of the `KmsMasterKeyId` attribute, and simply
store it as-as.  This mimics the behavior in AWS, where the key is not
validated until it is actually used (when publishing[1]).

[1]: https://docs.aws.amazon.com/sns/latest/dg/sns-server-side-encryption.html

Closes #3216
2020-10-16 12:30:07 +01:00
Brian Pandola
6505c893b8
Fix: S3 Bucket does not support attribute type Arn in Fn::GetAtt (#3388)
Fixes #3387
2020-10-16 11:29:26 +01:00
Brian Pandola
99556620a9
Fix: Empty sets not removed from item after UpdateExpression (#3386)
DynamoDB does not support empty sets. If the last item in a set is
deleted as part of an UpdateExpression, the attribute must be removed.

Ref: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html

Fixes #3296
2020-10-14 16:32:42 +01:00
Brian Pandola
ccda76898a
Add KMS Support to EBS Encrypted Volumes (#3383)
* Properly coerce `Encrypted` attribute to bool on request/response.
* Create and use a default AWS managed CMK for EBS when clients request
  an encrypted volume without specifying a KmsKeyId.

NOTE: A client-provided KmsKeyId is simply stored as-is, and is not validated
against the KMS backend. This is in keeping with other moto backends (RDS, Redshift)
that currently also accept unvalidated customer master key (CMK) parameters, but could
be an area for future improvement.

Closes #3248
2020-10-14 15:18:50 +01:00
Brian Pandola
ea19466c38
Fix missing properties when ecs:TaskDefinition created via CloudFormation (#3378)
There's a larger problem here that needs a more generalized solution,
but this solves the immediate issue with a minimum amount of code.

Closes #3171
2020-10-12 20:53:30 +01:00
nom3ad
fe361f861d
Enable more unit tests for ACM (#3372)
* Enable more unit tests for ACM

* put a smile on travis-ci face

Co-authored-by: nom3ad <nom3ad@gmail.com>
Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
2020-10-12 14:43:36 +01:00
waynemetcalfe
0a938f7bb4
issue-3379 iam list_roles: implement PathPrefix, MaxItems and Marker (#3380)
* issue-3379 iam list_roles: implement PathPrefix, MaxItems and Marker

* issue-3379 fix cloudformation test
2020-10-12 12:13:20 +01:00
nom3ad
ea0ba91f63
support Tags parameter in ACM import_certificate() and request_certificate() methods (#3373)
* ACM: support `tags` parameter in import_certificate()

* ACM: support tags parameter in  request_certificate()

* ACM: better tag operations with more unit tests

Co-authored-by: nom3ad <nom3ad@gmail.com>
2020-10-12 07:55:14 +01:00
nom3ad
502818be4c
Fixes acm:describe_certificate for imported certificates having no SAN extension (#3370)
* Fix(test_acm): describe_certificate testcase does't execute

* handle acm certificates lacking extensions

Co-authored-by: nom3ad <nom3ad@gmail.com>
2020-10-10 22:32:42 +01:00
Brian Pandola
c54f182ca1
Implement additional filters for ecs.ListTasks (#3376)
Closes #1785
2020-10-10 20:02:08 +01:00
Brian Pandola
4a336b8b04
Add ec2.vpc resource support to Tagging API (#3375)
Closes #1849
2020-10-10 19:05:21 +01:00
Brian Pandola
a2bd4515eb
Add better support for SQS MaximumMessageSize attribute (#3374)
Closes #3205
2020-10-10 17:54:36 +01:00
ezramorris
1e8f87a55d
Update table in README.md to render nicely in GitHub (#3369)
Co-authored-by: Ezra Morris <ezra.morris@smartcomptech.com>
2020-10-10 16:57:46 +01:00
Brian Pandola
db7842653f
iot:DeleteThingGroup should return success even for non-existent groups (#3367)
Closes #3026
2020-10-09 15:57:00 +01:00
Brian Pandola
c1b2c78db2
Fix TagFilter implementation in tag:GetResources (#3366)
The `tag_filter` method has been re-arranged to mimic the actual AWS behavior:
Return `True` if *any* tag matches a filter and *all* filters are matched.

Python's closures are late-binding, so we have to modify the lambdas accordingly!

Closes #2814
2020-10-09 13:55:48 +01:00
Brian Pandola
d00cefa25c
Add tagging to ec2.CopySnapshot (#3365)
The `@freeze_time` decorator was removed because it is not necessary (and was
causing the test to be skipped).

Closes #2940
2020-10-09 12:33:07 +01:00
ljakimczuk
c26bef6f79
Updates to FlowLogs and IMPLEMENTATION_COVERAGE (#3356)
* Replacing Unsuccessful class with tuple

* Updating coverage
2020-10-06 06:33:16 +01:00
Anton Grübel
349b9a990d
Add registeredAt to ecs container instance (#3358) 2020-10-05 15:39:59 +01:00
Sarang Joshi
08da2c92d9
fix(dynamodb2): Fix update_item nested insert (#3355)
When comparing old and new values when doing a nested item update, the
`!=` implementation fails when the value being compared is `None`. This
results in an exception when trying to insert a new item into a nested
map. So just do a quick check that the original value is exists before
doing the comparison, as the `None` default is what is tripping this.
2020-10-05 13:40:33 +01:00
Jon Michaelchuck
2391a4ab97
[SecretsManager] Handle missing secrets versions (#3349)
* SecretsManager - handle missing secrets versions

The get_secret_value method should raise ResourceNotFoundException
if a secret exists but the provided VersionId does not.

* Run black

* 2.x support

* black fix?

* secret is not a dict. Fix error msg output.
2020-10-05 12:22:54 +01:00
Roman Dmytrenko
c1a7f29c62
Fix issue with wrong parameter signed to secret_binary during secret rotation in Secrets Manager (#3348)
* fix issue with wrong parameter signed to secret_binary

* reformat test
2020-10-05 11:10:32 +01:00
usmangani1
a65c0f004c
Fix:SQS Receive Message (MessageAttributes) in response (#3303)
* Fix:SQS Receive Message (MessageAttributes) in response

* Fixed tests

Co-authored-by: usmankb <usman@krazybee.com>
2020-10-05 10:10:24 +01:00