Commit Graph

2962 Commits

Author SHA1 Message Date
xsphrx
236ab59afe
added cognito-idp initiate_auth and PASSWORD_VERIFIER challenge to respond_to_auth_challenge (#3260)
* added cognito-idp initiate_auth and PASSWORD_VERIFIER challenge to respond_to_auth_challenge

* fixed for python2

* added mfa, REFRESH_TOKEN to initiate_auth, SOFTWARE_TOKEN_MFA to respond_to_auth_challenge

* added negative tests

* test
2020-09-01 09:20:31 +01:00
usmangani1
bcf61d0b09
Fix: Api-Gateway ApiKeyAlreadyExists headers change. (#3162)
* Fix: Api-Gateway ApiKeyAlreadyExists headers change.

* Added test for non decorator

* Fixed cli errors

* Fix:fixed build errors

* Fix: assert only in case of non server mode

Co-authored-by: usmankb <usman@krazybee.com>
2020-09-01 08:25:59 +01:00
usmangani1
0a89f9d1df
Fix:SQS:Added Non existent queue name in ERROR RESPONSE (#3261)
* Fix:SQS:Added Non existent queue name in ERROR RESPONSE

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-27 17:31:20 +01:00
usmangani1
1c939a5f06
Fix:EC2-Create-Subnet availability Zone Id support (#3198)
* Fix:EC2-Create-Subnet availability Zone Id support

* Linting

* Fix:fixed build errors

* linting

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
Co-authored-by: usmankb <usman@krazybee.com>
2020-08-27 16:31:39 +01:00
jweite
49d92861c0
Iam cloudformation update, singificant cloudformation refactoring (#3218)
* IAM User Cloudformation Enhancements: update, delete, getatt.

* AWS::IAM::Policy Support

* Added unit tests for AWS:IAM:Policy for roles and groups.  Fixed bug related to groups.

* AWS:IAM:AccessKey CloudFormation support.

* Refactor of CloudFormation parsing.py methods to simplify and standardize how they call to the models.  Adjusted some models accordingly.

* Further model CloudFormation support changes to align with revised CloudFormation logic.  Mostly avoidance of getting resoure name from properties.

* Support for Kinesis Stream RetentionPeriodHours param.

* Kinesis Stream Cloudformation Tag Support.

* Added omitted 'region' param to boto3.client() calls in new tests.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-08-27 10:11:47 +01:00
Ciaran Evans
3b06ce689e
Address SFN.Client.exceptions.ExecutionAlreadyExists Not implemented (#3263)
* Add check for existing execution, fix issue with make init

* Remove f-string usage

* Remove fstring usage in test

* Pin black and run formatting on test_stepfunction

* Reverse changes made by black 20.8b1
2020-08-27 08:22:44 +01:00
Kevin Frommelt
55b02c6ee9
Add support for Launch Templates in Auto Scaling Groups (#3236)
* Add support for Launch Templates in Auto Scaling Groups

* Use named parameters, simplify parameter validation
2020-08-26 15:15:07 +01:00
jmbollard
2a27e457bf
Security group egress ip permissions fix (#3250)
* Add support for Description in egress rule response

* Update SecurityGroup default egress rule ip range

* Remove extra commas

* Remove extra commas

* Lower docker package in Travis

* Add more lambda vars per PR 3247

* Remove code added in 3247

* Add tests for egress rules with Descriptions

* Reformat based on black

Co-authored-by: spillin <jmbollard@me.com>
2020-08-26 14:27:45 +01:00
Guilherme Martins Crocetti
f744356da7
Lambda reserved concurrency (#3215)
* lambda-responses: add method to dispatch concurrency calls

* lambda-resources: add route to handle concurrency requests

* lambda-model: implement put_function_concurrency and concurrency attribute

* put-concurrency-tests: add one simple test

* get_function: add concurrency entry - with test

* lambda-reserved-concurrency: cloudformation support

* lambda-concurrency: implement delete_reserved with tests

* lambda-concurrency: implement get_reserved with tests

* lint

* implementation-cov: mark delete_function_concurrency, put_function_concurrency and get_function_concurrency

* botocore doesn't display concurrency entry for lambdas without it

* lambda(refactor): improvements on response's handler
2020-08-26 11:06:53 +01:00
Kamil Mańkowski
47a227921d
SES: Fix sending email when use verify_email_address (#3242) 2020-08-25 13:51:58 +01:00
Kamil Mańkowski
8a551a9754
[SNS] Mock sending directly SMS (#3253)
* [SNS] Mock sending directly SMS

Proper behaviour when publishing to PhoneNumber is sending
message directly to this number, without any topic or
previous confirmation.

https://docs.aws.amazon.com/sns/latest/dg/sns-mobile-phone-number-as-subscriber.html

* Fix arguments order

* Omit checking local backend when tests in server mode
2020-08-25 13:05:49 +01:00
usmangani1
9894e1785a
Enhancement : Ec2 - Add describe-vpc-endpoint-services method support. (#3108)
* Enhancement : Ec2 - Add describe-vpc-endpoint-services method support.

* Fix:EC2-describe_vpc_endPoint_services changed the template

* Fixed comments

* Linting

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-06 06:26:44 +01:00
usmangani1
a7ddcd7da3
Fix:EC2-authorize_security_group_ingress- add description to IP-Ranges (#3196)
* Fix:EC2-authorize_security_group_ingress- add description to IP-Ranges

* Fix:EC2-authorize_security_group_ingress- add test when description is not present.

* part commit

* Fix:fixed build errors

* Linting

* Allow for Python2 string/unicodes

Co-authored-by: usmankb <usman@krazybee.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-04 06:50:57 +01:00
jweite
da07adae52
* Support for CloudFormation update and delete of Kinesis Streams (#3212)
* Support for CloudFormation stack resource deletion via backend resource method
  delete_from_cloudformation_json() via parse_and_delete_resource().
* Correction to the inappropriate inclusion of EndingSequenceNumber in open shards.
  This attribute should only appear in closed shards.  This regretfully prevents
  confirmation of consistent record counts after split/merge in unit tests.
* Added parameters/decorator to CloudFormationModel method declarations to calm-down Pycharm.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-08-03 16:04:05 +01:00
Yuuki Takahashi
99736c3101
fix clear pending messages when call purge_queue (#3208) 2020-08-03 15:09:25 +01:00
Ninh Khong
061c609a8f
Fix secretsmanager random password wrong length (#3213)
* Enhance function get_parameter by parameter name, version or labels

* Fix random password with exclude characters return wrong length
2020-08-03 13:42:42 +01:00
Anton Grübel
252d679b27
Organizations - implement Policy Type functionality (#3207)
* Add organizations.enable_policy_type

* Add organizations.disable_policy_type

* Add support for AISERVICES_OPT_OUT_POLICY
2020-08-02 10:56:19 +01:00
jweite
3342d49a43
S3 cloudformation update (#3199)
* First cut of S3 Cloudformation Update support: encryption property.

* Update type support for S3.  Abstract base class for CloudFormation-aware models, as designed by @bblommers, introduced to decentralize CloudFormation resource and name property values to model objects.

* Blackened...

* Un-renamed param in s3.models.update_from_cloudformation_json() and its call to stay compatible with other modules.

Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-01 22:43:03 +01:00
Larry Aiello
06ed67a8e5
Implement UserIds for Snapshot Attributes (#3192)
* implement register_image

* format code

* add user_ids to snapshot model

* implement register_image

* format code

* add user_ids to snapshot model

* trying to un-deprecate tests

* Write tests and finalize implementation

* Add region parameter to boto3 resource call

* fixed test error
2020-08-01 17:03:54 +01:00
Iain Bullard
88a1134657
Fix DynamoDb2 ExpressionAttributeNames can start with a number (#3206)
When using pynamodb's support for transactions it makes use of of
ExpressionAttributeNames that look like #0 #1 etc. According to

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ExpressionAttributeNames.html

And when testing against dynamodb-local these work without issue,
however, when testing with moto they fail.
2020-07-31 17:46:48 +01:00
Anton Grübel
8162947ebb
Organizations - implement Delegated Administrator functionality (#3200)
* Add organizations.register_delegated_administrator

* Add organizations.list_delegated_administrators

* Add organizations.list_delegated_services_for_account

* Add organizations.deregister_delegated_administrator

* Fix Python2 incompatibility
2020-07-31 16:32:57 +01:00
Chris Kilding
943ecb7ea7
Support --filters option in secretsmanager:ListSecrets (#3173)
* Feature: Support --filters opton in secretsmanager:ListSecrets

* Implement some of the secret filters

* Check listSecrets filters combine with an implicit AND operator

* Test all filter and multi-value filter and multi-word filter

* Fix matcher behavior, restructure code

* Implement remaining listSecrets filter cases

* Linter fixes

* Use contains-in-any-order assertions for test_list_secrets

* Linter fix again

* Attempt Python 2 fix for assert_items_equal

* Remove docstrings from test_list_secrets tests as they make the test reports weird

* Test and handle listSecrets filter with no values
2020-07-31 15:31:18 +01:00
Matt Williams
50d71eccbe
Fix XML schema for ec2.describe_instance_types (#3194)
* Add test for describe_instance_types

It currently fails due to an invalid XML schema

* Add more detail to test

* Fix the XML schema for describe_instance_types
2020-07-29 18:36:37 +01:00
Waldemar Hummer
08a08b6af8
Fix SQS tag list from CloudFormation resource creation (#3197)
* fix sqs tag list from cloudformation resource creation

the method `create_from_cloudformation_json` of the Sqs resource
does not handle the difference of format of the Tags field in the
resource template and the format expected in Sqs resource class.

In cfn resource template Tags is specified as a list of dicts. But
the Sqs resource expects that the tags field be a single dict.
This behaviour causes a crash when a queue is created with tags
from `create_from_cloudformation_json` and later the list_queue_tags
is called because it tries to call `items` from `queue.tags` but
tags is actually a list of dicts.

* fix comment

* fix linter

* minor

Co-authored-by: Hudo Assenco <hudo.assenco@gmail.com>
2020-07-29 11:44:02 +01:00
jweite
736c8b77ce
Fixed Failures in CloudFormation Provisioning of S3 Buckets When Stack has Long Name... (#3169)
* Fixed defect with CloudFormation provisioning of S3 buckets occuring when stack has a long name, resulting in the default S3 bucket name's length exceeding its 63 char limit.

* PR 3169 July 23, 2020 2:57a ET comment: added additional asserts to assure provisioned bucket's name complies.  Fixed bug in my earlier change that could produce default bucket names with illegal upper-case characters in it.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-07-29 07:47:18 +01:00
Ninh Khong
ff1f565142
Enhance function get_parameter by parameter name, version or labels (#3191)
Co-authored-by: Ninh Khong <ninh@1on1english.vn>
2020-07-28 16:59:22 +01:00
Jordan Reiter
28d1d762af
Enforce parameter naming (#3190)
* Enforce parameter naming

Parameters are not allowed to start with `ssm` or `aws`. This commit adds error messages which
correspond exactly to the error messages returned by boto3.

* Fix for Python 2 compatibility

f-strings not supported in Python 2.7
2020-07-28 15:26:59 +01:00
Ninh Khong
97139d4253
Fix : SQS - Added support for attribute labels for send_message function (#3181)
* Fix : SQS - Added support for attribute labels for send_message function

* Add integration test on receive message function

* Add send message invalid datetype integration test and fix SQS MessageAttributesInvalid exceptions
2020-07-28 14:34:26 +01:00
Jordan Reiter
126f5a5155
Implement Filter: Contains functionality for describe_params (#3189)
* Implement Filter: Contains functionality for describe_params

This commit adds the Contains functionality. Tests were created
to mimic behavior in AWS/boto3, including that filters with values
in the form of `/name` will match parameters named `/name/match` but
not parameters named `match/with/other-name`. In the test example, a
Contains filter with the value `/tan` would match: `/tangent-3` and
`tangram-4` but not `standby-5`.

* Enforce parameter filter restrictions on get_parameters_by_path

According to the boto3 documentation [1], `Name`, `Path`, and `Tier` are not
allowed values for `Key` in a parameter filter for `get_parameters_by_path`.

This commit enforces this by calling `_validate_parameter_filters` from the
`get_parameters_by_path` method, and adding a check to `_validate_parameter_filters`.

I added 3 test cases to `test_get_parameters_by_path` which check for the correct
exception when calling with a parameter filter using any of these keys.

* Code formatted to match style

* Refactored logic
2020-07-28 10:17:35 +01:00
usmangani1
1db42fb865
FIX : IAM - Added support for pathPrefix in list_users_function (#3180)
* FIX:IAM-Added support for pathPrefix in list_users_function

* removed changes for roles

* Added test for non decorator

* changed filter function

Co-authored-by: usmankb <usman@krazybee.com>
2020-07-27 15:32:41 +01:00
usmangani1
bc1674cb19
CF : Added support for get template summary (#3179)
* CF : Added support for get template summary

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-27 14:08:01 +01:00
Bert Blommers
03dd55d39d
Organisations - Put back assertions that got lost in a merge (#3184) 2020-07-27 12:36:31 +01:00
Hector Acosta
cdc4385e2a
Various changes to organizations endpoint (#3175)
* Raise DuplicatePolicyException when a policy with the same name exists

* Implement update_policy

* Implement delete_policy
2020-07-27 12:32:11 +01:00
Steve Pulec
41427a78b6
Merge pull request #3147 from bblommers/enhancement/3139
ECS - UpdateService - Allow service ARN to be passed in
2020-07-26 15:31:12 -05:00
Steve Pulec
7481d07a3d
Merge pull request #3119 from bblommers/bugfix/dynamodb_table_cfn_output
CFN - Allow DynamoDB table as an Output
2020-07-26 15:30:29 -05:00
Steve Pulec
980525c3dd
Merge pull request #3121 from bblommers/bugfix/2104
S3 - Persist metadata for Presigned URL
2020-07-26 15:29:38 -05:00
Larry Aiello
2504a398f9
Implement ec2.register_image() (#3177)
* implement register_image

* format code
2020-07-26 13:51:26 +01:00
Koichi Ogura
448ff45174
fix cognito-idp UserPool ClientId (#3165)
* fix cognito-idp UserPool ClientId

* add test

* replace uuid4 to create_id
2020-07-22 14:08:17 +01:00
ryanlchandler
bf8eb11dc3
Adding MessageGroupId and MessageDeduplicationId (#3163)
Adding MessageGroupId and MessageDeduplicationId when sent from batch (#3101)
2020-07-22 13:09:12 +01:00
Alan Baldwin
b09c8034e6
Adding VPN Gateway filters (#3155)
* Adding attchment.vpc-id, attachment.state, type, and vpn-gateway-id filters for VPN Gateways. fixes #3154

* Run formatting on tests

Co-authored-by: Alan Baldwin <alan.baldwin.jr@gmail.com>
2020-07-21 16:08:49 +01:00
Anton Grübel
a507314d45
RAM - implement CRUD endpoints (#3158)
* Add ram.create_resource_share

* Add ram.get_resource_shares

* Add ram.update_resource_share

* Add ram.delete_resource_share

* Add ram.enable_sharing_with_aws_organization

* Fix server tests

* Add CR suggestions
2020-07-21 14:15:13 +01:00
Aaron Hill
1e5b8acac6
Implementation: ECS Task Sets (#3152)
* initial implementation of taskSets.  Fixed a bug with ECS Service where task_definition was a required parameter.

* Added update_task_set and tests.  DRYed up ClusterNotFoundException. General cleanup.

* Added support for filtering tags on include parameter to describe_task_sets.  Added additional tests.

* Fix copy/pasta in ClusterNotFoundException

* styling updates

* Added TODO for delete_task_set force parameter

* Updated multiple function and constructor calls to use named variables.  Updated tests to reference variables instead of hardcoded strings.

* Run black for formatting

* Updated create_service function call to use named variables
2020-07-21 07:17:37 +01:00
cm-iwata
fdeee07762
Add basic implement for cognito-idp create_resource_server (#3153)
* Add basic implement for cognito-idp create_resource_server

* lint
2020-07-20 12:31:30 +01:00
jweite
ba99c61477
Basic Support for Endpoints, EndpointConfigs and TrainingJobs (#3142)
* Basic upport for Endpoints, EndpointConfigs and TrainingJobs

* Dropped extraneous pass statement.

Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-07-19 15:06:48 +01:00
usmangani1
a123a22eeb
Fix : cloudFormation dynamodb : delete resource on delete stack (#3120)
* Fix :  cloudFormation dynamodb : delete resource on delete stack

* Delete function for dynamodb

* Added tests for delete stack using dynamodb.

* Added tests for non decorator

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-19 11:59:19 +01:00
usmangani1
552b1294df
Fix : EC2 - Added ownerId filter for describe instances (#3149)
* Fix : EC2 - Added ownerId filter for describe instances

* linting
2020-07-19 10:44:58 +01:00
Logan Jones
6fb7867767
Fix: Put Events API (#3145)
* Fix: Put Events API

* Update from code review.

Co-authored-by: Logan Asher Jones <logan@codescratch.com>
2020-07-19 10:00:24 +01:00
usmangani1
09b764148c
Fix : Added implementation for CloudWatch Describe Metric for Alarm (#3148)
* Fix : added implementation for CloudWatch Describe Metric for Alarm

* Linting

Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-07-18 10:47:53 +01:00
Bert Blommers
f69688b064 ECS - UpdateService - Allow Service ARNs 2020-07-17 12:50:06 +01:00
Bert Blommers
bed769a387
Tech debt - increase test timeouts to remove intermittant test failures (#3146) 2020-07-17 12:11:47 +01:00